If you are using the Java EE 6 SDK Web Profile, it does not support JAX-RS by default. Add JAX-RS support through the Update Center.
In NetBeans 6.7 IDE right-click the Enterprise Server v3 instance in the Services tab and select View Update Center.
The Update Tool interface is displayed.
In the navigation tree, expand Sun GlassFish Enterprise Server v3 and select Available Add-ons.
Select Jersey RESTful Web Services for GlassFish and click Install.
Click Accept to accept the terms of the license agreement.