Your First Cup: An Introduction to the Java EE Platform
4.5 Building, Packaging, Deploying, and Running the firstcup-war Web Application
In this section, you will build the firstcup-war
web application, deploy it to the server, and run the application.
4.5.1 Build, Package, and Deploy the firstcup-war Web Application
Now build and package the DukesBirthdayBean
enterprise bean, the FirstcupUser
entity, and the firstcup-war
web client into a WAR file, firstcup-war.war
, then deploy it to the server.
-
In the Projects tab, select the
firstcup-war
project. -
Right-click
firstcup-war
and select Run.
After firstcup-war.war
deploys successfully to GlassFish Server, a web browser will load the application URL.
4.5.2 Run the firstcup-war Application
-
On the greeting page, enter your birth date in the Your birthday field. Make sure you use the date pattern specified on the page: MM/dd/yyyy.
-
Click Submit.
-
After the
response.xhtml
page is displayed, click Back to return to thegreeting.xhtml
page. -
Enter a different birthday in the text field and click Submit again to see how the average age of First Cup users changes.