Your First Cup: An Introduction to the Java EE Platform
4.1 Creating the firstcup-war Project
The firstcup-war
web application project consists of the Java Persistence API entity, the enterprise bean, and the JavaServer Faces web front end.
4.1.1 Create the Web Application Project Using the Archetype
Follow these steps to create a new web application project using the firstcup-war-archetype
in NetBeans IDE.
-
From the File menu, select New Project.
-
Under Projects, select Project from Archetype.
-
Click Next.
-
In the Search field, enter
firstcup
. -
In the Known Archetypes field, select
firstcup-war-archetype
. -
Click Next.
-
In the Project Name field, enter
firstcup-war
. -
In the Package field, enter
firstcup
. -
Click Finish.
You should now see the module you created in the Projects tab.
The firstcup-war-archetype
archetype creates the structure of the web application, including the following:
-
Basic entity classes
-
Basic enterprise bean classes
-
Basic backing bean classes
-
Basic Facelets XHTML components and views
-
The
web.xml
,faces-config.xml
, andpersistence.xml
deployment descriptors
After you create the basic application structure with the archetype, you will configure how the application will run, implement the functionality of the classes, implement the Facelets views, and then deploy the application.