ManagedBeansWebApp Example

This example demonstrates how to develop RESTful web service with a Servlet 2.5 container.

Contents

The example consists of just one Java class:

com.sun.jersey.samples.managedbeans.resources.ManagedBeanResource
A resource class 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
/managedbean HelloWorldResource GET

Running the Example

If you are working with Jersey GlassFish update center module installed into your existing GlassFish instance, you will need to follow instructions at the module README file in order to deploy the example.

Otherwise, you can run the example using embedded GlassFish as follows:

run

mvn glassfish:run

From a web browser, visit:

http://localhost:8080/managed-beans-webapp/managedbean