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.

Examples: SecuringWeb Applications<br />

880<br />

FIGURE 30–10 <strong>The</strong> Running Basic Authentication Example<br />

Note – For repetitive testing of this example, you may need to close and reopen your browser.<br />

You should also run the ant clean and ant undeploy targets or the NetBeans IDE Clean and<br />

Build option to get a fresh start.<br />

Troubleshooting the Basic Authentication Example<br />

When doing iterative development with this web application, follow these steps if you are using<br />

NetBeans IDE:<br />

1. Close your web browser.<br />

2. Clean and recompile the files from the previous build by right-clicking hello2_basicauth<br />

and selecting Clean and Build.<br />

3. Redeploy the application by right-clicking hello2_basicauth and selecting Undeploy and<br />

Deploy.<br />

4. Open your web browser and reload the following URL:<br />

http://localhost:8080/hello2_basicauth/greeting<br />

Follow these steps if you are using the Ant tool:<br />

1. Close your web browser.<br />

2. Undeploy the web application. To undeploy the application, use the following command in<br />

the directory:<br />

ant undeploy<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!