Groovy Example

This example demonstrates how to develop RESTful hello world web service using Groovy and the embedded Grizzly server.

Contents

The example consists of just one Jersey resource:

com.sun.jersey.samples.groovy.GroovyResource
that produces a textual response to an HTTP GET.

The mapping of the URI path space is presented in the following table:

URI path Resource class HTTP methods
/groovy GroovyResource GET

Running the Example

Run the example as follows:

run

mvn compile exec:java

From a web browser, visit:

http://localhost:9998/groovy