1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

GroovyConsole servlet or portlet

From jeeutils

Jump to: navigation, search


GroovyConsole servlet (or portlet)

Presents a web page that lets you type and execute on the server Groovy/Java commands and displays the output. Also provides history of previous commands. This tool is incredibly useful when you need to examine and test (and perhaps reconfigure) the behavior of a live system running on an application server - sometimes you just can't test some things offline.

Notice that while the original version (0.9) could have been deployed either as a servlet or as a portlet, versions from 1.0.0 on support only the servlet form (but are much simpler to deploy).

The portlet version has been proved to work with Liferay and the servlet with WebSpehere 5.1.

If you are the visual type, see Screenshot #1 :-).


Latest release: 1.0.0


You can install GroovyConsole v1+ either by just copying its files (a .jsp and 2 or more .jars based on what features you want) into your application or by installing it as a stand-alone webapp using one of the provided .war files. Follow the instructions in the readme file and see the download section and/or files in SVN (that's the CMS used before Git was invented :-)).


Java 5+ and servlet 2.4+

Everything should just work.

Java 1.4 or Servlet 2.3

  • For Java 1.4 you may only use Groovy up to version 1.5.8
  • For Servlet 2.3 you need to modify the taglib reference for JSTL in GroovyConsole.jsp - see the readme file (or just use files from the corresponding .war file)

Tips & tricks

List Session attributes (request is a predefined variable containing the HttpServletRequest)

   request.getSession().getAttributeNames().each { print "$it\n" }
Personal tools