10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

com.sun.cb.CheckoutFormBean<br />

<br />

request<br />

<br />

firstName<br />

Coffee<br />

<br />

<br />

lastName<br />

Lover<br />

<br />

<br />

email<br />

jane@home<br />

<br />

...<br />

<br />

<br />

/orderForm.jsp<br />

<br />

checkout<br />

/checkoutForm.jsp<br />

<br />

<br />

Building, Packaging, Deploying, and Running the Coffee Break Application<br />

As shown in the managed-bean element, the checkoutForm bean properties are initialized with<br />

the values for the user, Coffee Lover. In this way, the hyperlink tag from orderForm is not<br />

required to submit these values in the request parameters.<br />

As shown in the navigation-rule element, when the String, checkout, is returned from a<br />

method referred to by a component’s action attribute, the checkoutForm page displays.<br />

Building, Packaging, Deploying, and Running the Coffee<br />

Break Application<br />

<strong>The</strong> source code for the Coffee Break application is located in the directory<br />

tut-install/javaeetutorial5/examples/coffeebreak/. Within the cb directory are<br />

subdirectories for each web application (cb, cb-saaj, and cb-jaxws) and a directory,<br />

cb-common, for classes shared by the web applications. Each subdirectory contains a build.xml<br />

file. <strong>The</strong> web application subdirectories in turn contain a src subdirectory for <strong>Java</strong> classes and<br />

configuration files, and a web subdirectory for web resources.<br />

Chapter 36 • <strong>The</strong> Coffee Break Application 1043

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!