The Java EE 5 Tutorial

Building, Packaging, and Deploying the Servlet Basic Authentication Example Using NetBeans IDE

    To build, package, and deploy the web/hello2_basicauth example application using NetBeans IDE, follow these steps:

  1. If you have not already done so, follow the instructions in Building the Examples. This step is necessary to provide the Ant targets with the location of your tutorial and Application Server installations.

  2. If you have not already done so, add authorized users to the file realm of the Application Server as described in Adding Authorized Roles and Users.

  3. Open the project in NetBeans IDE by selecting File->Open Project.

  4. Browse to the tut-installjavaeetutorial5/examples/web/hello2_basicauth/ directory.

  5. Make sure that Open as Main Project is selected.

  6. Select Open Project.

  7. Right-click hello2_basicauth in the Projects pane, then select Clean and Build.

  8. Right-click hello2_basicauth in the Projects pane, then select Undeploy and Deploy.

  9. To run the servlet, follow the steps in Running the Basic Authentication Servlet.