The firstcup web application project consists of the Java Persistence API entity, the enterprise bean, and the JavaServer Faces web front-end.
Follow these steps to create a new web application project in NetBeans IDE.
Select File -> New Project.
Under Categories select Java Web, then under Projects select Web Application, and click Next.
Set the Project Name to firstcup.
Set the Project Location to tut-install/myexample, where tut-install is the location of the firstcup tutorial installation.
Click Next.
Select your GlassFish Server instance from the Server menu.
Select Java EE 6 from the Java EE Version menu.
Set Context Path to /firstcup and click Next.
Under Frameworks select JavaServer Faces.
Click the Configuration Tab, then under Servlet URL Pattern enter /firstcupWeb/* and click Finish.