The Java EE 6 Tutorial

ProcedureTo Build, Package, and Deploy the Servlet Basic Authentication Example Using Ant

  1. Follow the steps in To Set Up Your System for Running the Security Examples.

  2. In a terminal window, go to:


    tut-install/examples/security/hello2_basicauth/
    
  3. Type the following command:


    ant
    

    This command calls the default target, which builds and packages the application into a WAR file, hello2_basicauth.war, that is located in the dist directory.

  4. Make sure that the GlassFish Server is started.

  5. To deploy the application, type the following command:


    ant deploy