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.

Contents<br />

Starting and Stopping the <strong>Java</strong> DB Database Server ........................................................................ 69<br />

Building the Examples ........................................................................................................................ 69<br />

Building the Examples Using NetBeans IDE ............................................................................ 69<br />

Building the Examples on the Command-Line Using Ant ..................................................... 70<br />

<strong>Tutorial</strong> Example Directory Structure .............................................................................................. 71<br />

Debugging <strong>Java</strong> <strong>EE</strong> Applications ....................................................................................................... 72<br />

Using the Server Log .................................................................................................................... 72<br />

Using a Debugger ......................................................................................................................... 72<br />

Part II <strong>The</strong>WebTier ......................................................................................................................................... 75<br />

3 Getting Started withWeb Applications ........................................................................................... 77<br />

Web Applications ................................................................................................................................ 77<br />

Web Application Life Cycle ................................................................................................................ 80<br />

Web Modules ....................................................................................................................................... 81<br />

Packaging Web Modules .............................................................................................................83<br />

Deploying a WAR File ................................................................................................................. 84<br />

Testing Deployed Web Modules ................................................................................................ 85<br />

Listing Deployed Web Modules ................................................................................................. 86<br />

Updating Web Modules ..............................................................................................................86<br />

Undeploying Web Modules ........................................................................................................ 88<br />

Configuring Web Applications .......................................................................................................... 89<br />

Mapping URLs to Web Components ........................................................................................ 89<br />

Declaring Welcome Files ............................................................................................................ 91<br />

Setting Initialization Parameters ................................................................................................ 92<br />

Mapping Errors to Error Screens ............................................................................................... 93<br />

Declaring Resource References .................................................................................................. 94<br />

Duke’s Bookstore Examples ............................................................................................................... 96<br />

Accessing Databases from Web Applications .................................................................................. 97<br />

Populating the Example Database ............................................................................................. 97<br />

Creating a Data Source in the Application Server .................................................................... 98<br />

Further Information about Web Applications ................................................................................. 98<br />

5

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

Saved successfully!

Ooh no, something went wrong!