The Grails web environment has a Grails console, which is basically a Groovy console that has access to your web application state. More specifically, the Grails console has a bunch of predefined variables that you can use to access / modify the web application at run time. For example, ctx is a predefined variable that provides access to the Spring beans application (AKA ApplicationContext).
Normally, the grails console works as a desktop application, but there is a plugin that allows you to enable it as part of the application itself and, therefore, use it through a web browser.
source share