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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

1046<br />

To build, package, and deploy the Coffee Break server using Ant, follow these steps:<br />

1. In a terminal window, go to tut-install/javaeetutorial5/examples/coffeebreak/cb/.<br />

2. Run ant. This task calls the default target, which compiles the server classes.<br />

3. Make sure the Application Server is started.<br />

4. Deploy the Coffee Break server:<br />

ant deploy<br />

Running the Coffee Break Client<br />

After you have installed all the web applications, check that all the applications are running in<br />

the Admin Console. You should see cb, cb-saaj, and cb-jaxws in the list of applications.<br />

You can run the Coffee Break client by opening this URL in a web browser:<br />

http://localhost:8080/cbserver/<br />

A page appears with the following message:<br />

Redirecting to CoffeeBreak demo...click here otherwise.<br />

In a few seconds, you should see a page like the one shown in Figure 36–2.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

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

Saved successfully!

Ooh no, something went wrong!