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.

Deploying with the Admin Console<br />

1. Expand the Applications node.<br />

2. Select the Web Applications node.<br />

3. Click the Deploy button.<br />

4. Select the radio button labeled “Package file to be uploaded to the Application Server.”<br />

5. Type the full path to the WAR file (or click on Browse to find it), and then click the OK<br />

button.<br />

6. Click Next.<br />

7. Type the application name.<br />

8. Type the context root.<br />

9. Select the Enabled box.<br />

10. Click the Finish button.<br />

Deploying with asadmin<br />

To deploy a WAR with asadmin, open a terminal window or command prompt and execute<br />

asadmin deploy full-path-to-war-file<br />

Deploying with Ant<br />

To deploy a WAR with the Ant tool, open a terminal window or command prompt in the<br />

directory where you built and packaged the WAR, and execute<br />

ant deploy<br />

Deploying with NetBeans IDE<br />

To deploy a WAR with NetBeans IDE, do the following:<br />

1. Select File→Open Project.<br />

2. In the Open Project dialog, navigate to your project and open it.<br />

3. In the Projects tab, right-click the project and select Undeploy and Deploy.<br />

Testing DeployedWeb Modules<br />

Web Modules<br />

Now that the web module is deployed, you can view it by opening the application in a web<br />

browser. By default, the application is deployed to host localhost on port 8080. <strong>The</strong> context<br />

root of the web application is hello1.<br />

Chapter 3 • Getting Started withWeb Applications 85

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

Saved successfully!

Ooh no, something went wrong!