Externalized Groovy

This is the same functionality as the "Inline Groovy" example, but packaged differently. This time we have a Groovy path configured with the <g:setPath> tag, and then a filename reference in the <g:script> instead of inline Groovy.

Because of the use of <g:setPath>, we have to explicitly close the Groovy runtime using the <g:close> tag at the end of the request. The runtime is created every request, so it has the same performance ramifications as the inline model.

Note that you can combine inline scripts with classes on the Groovy path; you're not limited to scripts on the path.

No Emery

There He Is!