RESTful Web Services Developer's Guide

ProcedureBuilding and Running the Storage-Service Application from the Command Line

  1. Make sure that Maven is installed and configured, as described in Running the Jersey Examples.

  2. Open a terminal prompt and navigate to jersey.home/samples/storage-service.

  3. To run the sample, enter mvn clean compile exec:java and press Enter.

    This will build, package, and deploy the web storage service using Grizzly, an HTTP web server.


    Tip –

    To run the application on GlassFish, copy the classes from the example into sources of the web application. Then, create a web.xml file that uses the Jersey servlet. The Java classes are not dependent on a particular container.


  4. To view the Web Application Description Language file (the WADL), open a web browser and navigate to:


    http://localhost:9998/storage/application.wadl

    The WADL description in also shown in this document at Example: The Storage-Service WADL

  5. Leave the terminal window open, and open a new terminal window to continue with exploring this sample.