Once you have all the necessary downloads, you must configure the tutorial bundle to reflect your environment.
NetBeans 6.7 IDE must be configured to support Sun GlassFish Enterprise Server v3.
In NetBeans 6.7 IDE select Tools -> Plugins.
In the Available Plugins tab select GlassFish v3 Enabler and click Install.
Click Next.
Check the License Agreement accept box and click Install.
After the plugins are installed, click Finish.
Restart NetBeans 6.7 IDE.
To run the tutorial examples in NetBeans 6.7 IDE, you must register your Enterprise Server v3 installation as a NetBeans Server Instance. Follow these instructions to register the Enterprise Server v3 in NetBeans 6.7 IDE.
Enable Enterprise Server v3 support as described in Enabling Enterprise Server v3 Support in NetBeans 6.7 IDE.
Select Tools -> Server Manager to open the Servers dialog.
Click Add Server.
Under Server, select GlassFish v3 and click Next.
Under Platform Location, browse to or enter the location of your Enterprise Server v3 installation.
Click Next.
Under Domain, use the drop-down list to select an existing domain, type in the path to the domain directly in the field, or type the name of a new domain to create.
Click Finish.
Install the Facelets plugins to enable the JavaServer Faces Facelets application framework support in NetBeans 6.7 IDE.
Select Tools->Plugins in NetBeans 6.7 IDE.
Click the Available Plugins tab, select Facelets Support, and click Install.
Click Next.
Check the License Agreement accept box and click Install.
After the plugins are installed, click Finish, then Close.
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.