CFGroovy Demo
Links: CFGroovy homepage
| source for this page.
| groovy grouping demo
This demo creates an array of strings, CFDUMPs it, and then uses
various scripting languages to add new elements to the array and output
it to the page. Groovy and JavaScript are guaranteed to work, Python,
PHP, and Ruby will also run if you have Jython, Quercus, and JRuby JARs
on your classpath.
Starting Array
Run some Groovy
[Hello, world., Groovy is...Groovy!]
Run some JavaScript
[Hello, world., Groovy is...Groovy!, JavaScript is lovely!]
Run some Python (via Jython)
Jython needs to be added to your classpath for the Python example to work
Run some PHP (via Quercus)
Quercus needs to be added to your classpath for the PHP example to work
Run some Ruby (via JRuby)
JRuby needs to be added to your classpath for the Ruby example to work
Run move Groovy
List:
"Hello, world."
"Groovy is...Groovy!"
"JavaScript is lovely!"
"CF Runtime: Railo 9,0,0,1"
"User Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
Final Array
Array |
1 | |
2 | string | Groovy is...Groovy! |
|
3 | string | JavaScript is lovely! |
|
4 | string | CF Runtime: Railo 9,0,0,1 |
|
5 | string | User Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
|