Troubleshooting the Example
Troubleshooting the Example
Note
For repetitive testing of this example, you may need to close and reopen your browser.
You should also run the ant clean and ant undeploy targets or the NetBeans IDE Clean and
Build option to get a fresh start.
Troubleshooting the Basic Authentication Example
When doing iterative development with this web application, follow these steps if you are using
NetBeans IDE:
1. Close your web browser.
2. Clean and recompile the files from the previous build by right-clicking hello2_basicauth
and selecting Clean and Build Project.
3. Redeploy the application by right-clicking hello2_basicauth and selecting Deploy Project.
4. Open your web browser and reload the following URL:
http://localhost:8080/hello2_basicauth/greeting
Follow these steps if you are using the Ant tool:
1. Close your web browser.
2. Undeploy the web application. To undeploy the application, use the following command in
the directory:
ant undeploy
3. Clean out files from the previous build, using the following command:
ant clean
4. Recompile, repackage, and redeploy the application, using the following commands:
ant
ant deploy
5. Open your web browser and reload the following URL:
http://localhost:8080/hello2_basicauth/greeting
Example: Basic Authentication with JAX-WS
This section discusses how to configure a JAX-WS-based web service for HTTP basic
authentication. When a service that is constrained by HTTP basic authentication is requested,
the server requests a user name and password from the client and verifies that the user name
and password are valid by comparing them against a database of authorized users.
Examples: Securing Web Applications
Chapter 30 · Securing Web Applications
885