Make sure that Maven is installed and configured, as described in Running the Jersey Examples.
Select File->Open Project in NetBeans IDE 6.5.
Navigate to jersey/samples, select HelloWorld-WebApp, and click OK.
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.
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 |