A Groovy Web Console in a Java webapp?-Collection of common programming errors

The Grails web framework has the Grails console which is basically a Groovy console that has access to your web app’s state. More specifically, in the Grails console there are a bunch of predefined variables which you can use to access/change the web app at runtime. For example ctx is a predefined variable that provides access to the application’s Spring beans (AKA ApplicationContext).

Normally the grails console runs as a desktop app, but there’s a plugin available that will let you include it as part of the application itself, and therefore use it via a web browser.