RESTful Web Services Developer's Guide

ProcedureBuilding and Running the HelloWorld-WebApp Application with Maven

  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/HelloWorld-WebApp.

  3. Enter mvn glassfish:run and press Enter.

    This will build, package, deploy, and run the web application. It will also start GlassFish if it is not running.

  4. In a web browser navigate to:


    http://localhost:8080/helloworld-webapp/helloworld

    You will see the following output in your web browser:


    Hello World