Groovy and Tomcat, Pt4 – Groovy Servlet Pages

Groovy Server Pages (GSP)

Setting up GSP is as easy as setting up scripts.

Add following to the project:

- groovy.jar
- groovy-json.jar
- groovy-servlet.jar
- groovy-templates.jar
- groovy-xml.jar
- antlr.jar
- asm.jar



And then just create your .gsp file:

<head><title>Groovy Pages</title></head>
<p><% println "hello world" %></p>

Navigating to the gsp url gives me the following:

Still easy as 1-2-3.

The next part will be up later tonight as it’s under construction. It will feature a project that ties all the different groovy parts together into one project.

Until then, take care,

Add Comment Register

Leave a Reply