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.

Encapsulating Reusable Content UsingTag Files<br />

232<br />

<br />

<br />

<br />

<br />

Hello<br />

<br />

<br />

<br />

${greeting}, my name is Duke. What’s yours?<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

To deploy and run the hello3 application with NetBeans IDE, follow these steps:<br />

1. In NetBeans IDE, select File→Open Project.<br />

2. In the Open Project dialog, navigate to:<br />

tut-install/javaeetutorial5/examples/web/<br />

3. Select the hello3 folder.<br />

4. Select the Open as Main Project check box.<br />

5. Click Open Project.<br />

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

7. To run the application, open the bookstore URL http://localhost:8080/hello3.<br />

To deploy and run the hello3 application with Ant, follow these steps:<br />

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

2. Type ant. This target will spawn any necessary compilations, copy files to the<br />

tut-install/javaeetutorial5/examples/web/hello3/build/ directory, and create a WAR<br />

file.<br />

3. Start the Application Server.<br />

4. To deploy the example, type ant deploy.<br />

5. To run the example, open your browser to http://localhost:8080/hello3.<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!