# Jersey RESTful Web services for GlassFish

This subdirectory contains Jersey samples and javadocs.

## Javadocs

- Jersey Javadocs
- JAX-RS Javadocs

## Samples

Selection of Jersey samples are placed in the samples subdirectory. All of them were taken from Jersey project at http://jersey.java.net/, and are available also on java.net maven repository at https://maven.java.net/content/repositories/releases/com/sun/jersey/samples/jersey-samples/. They represent samples, which could be packaged as wars and easily deployed onto GlassFish instance.

### Running Samples

The following samples are included:

- bookmark
- bookmark-em
- bookstore
- extended-wadl-webapp
- helloworld-webapp
- jersey-cdi
- jersey-ejb
- jmaki-backend
- managed-beans-webapp
- scala-helloworld-webapp
- simple-servlet
- spring-annotations

For running the examples from command line you will need maven installed. Then you can just:

    cd $AS_HOME/jersey/samples/[sample-name]
    mvn clean package
    $AS_HOME/bin/asadmin deploy target/[sample-name].war

You can also use GlassFish admin console to deploy a generated war file. Just start your GlassFish instance and visit http://localhost:4848. Then select `Applications`->`Web Applications` node in the left-hand menu and click the `Deploy...` button. In the following screen, just select an example war file, and click the `OK` button at the bottom of the screen to get it deployed.

Another option would be to run the examples using NetBeans 6.5

## GFv3 Prelude Notes

For Jersey based web applications, which are using JSP Views feature (see the bookstore example), you will need to bundle jersey jars with the application war file. This is a known limitation, which will be addressed in the future releases.