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.
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.