Creating the firstcup Project
The firstcup web application project consists of the Java Persistence API entity, the enterprise bean, and the JavaServer Faces web front-end.
Create the Web Application Project
Follow these steps to create a new web application project in NetBeans IDE.
- From the File menu, choose New Project.
- In the Categories pane, select Java Web.
- In the Projects pane, select Web Application.
- Click Next.
- In the Project Name field, type firstcup.
- In the Project Location field, browse 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.
- Make sure Java EE 6 Web is selected in the Java EE Version menu.
- Check the Enable Contexts and Dependency Injection box.
- In the Context Path field, makes sure it is set to /firstcup.
- Click Next.
- Under Frameworks, select JavaServer Faces.
- Click Finish.
- From the Projects tab, right-click the index.xhtml file and select Delete. Click Yes in the dialog.