Groovy web console in a Java web application?

I've been looking at Groovy a bit lately and I like the idea of ​​the Groovy Web Console .

I'm reluctantly wondering if there is a way to embed a simple web control to write and run scripts from a web application that I could put together.

  • Is there a plugin solution for embedding such a control?
  • Are there any resources or recommendations to help maintain the source code?
+3
source share
1 answer

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.

+2
source

All Articles