RESTful Web Services Developer's Guide

ProcedureBuilding and Running the HelloWorld-WebApp Application in NetBeans

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

  2. Select File->Open Project in NetBeans IDE 6.5.

  3. Navigate to jersey/samples, select HelloWorld-WebApp, and click OK.

  4. Right click the HelloWorld-WebApp project in the Projects pane and select Run.

    This will generate the helper classes and artifacts for your resource, compile the classes, package the files into a WAR file, and deploy the WAR to your GlassFish instance.

  5. If a web browser doesn't open automatically to display the output, you may need to open a web browser and enter the URL for the application.


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

    You will see the following output in your web browser:


    Hello World