Managed Runtime

Another version of the "Inline Groovy" example, this time with an explicitly managed Groovy runtime. The Groovy runtime is instantiated into the application scope once, and then used across all requests.

If you put your runtime at application.cfgroovy, the <g:script> tag will automatically use it. If it's somewhere else, you must explicitly pass it via the cfgroovy attribute of <g:script> or use the <g:setRuntime> tag each request (the latter being preferable). Otherwise, you'll revert to the basic inline model, where a new runtime is implicitly created.

No Emery

// better add emery variables.myArray.add("emery")

There He Is!