Your First Cup: An Introduction to the Java EE Platform

Building, Packaging, Deploying, and Running the firstcup Web Application

In this section, you will build the firstcup web application, deploy it to the server, and run the application.

ProcedureBuilding and Packaging the firstcup Web Application

While performing this task, you'll build and package the DukesBirthdayBean enterprise bean and the firstcup web client into an WAR file, firstcup.war, in the dist directory.

  1. Select firstcup in the Projects tab.

  2. Right-click firstcup and select Run.

ProcedureRunning the firstcup Application

This section describes how to run the firstcup application.

  1. Launch an internet browser.

  2. Enter the following URL in the address field of the browser:


    http://localhost:8080/firstcup
  3. Enter your birth date in the Your birthday text field. Make sure you use the date pattern specified on the page: MM/dd/yyyy.

  4. Click Submit.

  5. After the response.xhtml page is displayed, click Back to return to the greeting.xhtml page.


Example 3–6 A Successful Response Page for firstcup


You are 20 years older than Duke!
The average age difference of all First Cup users is: 20