Sun Java System Application Server Platform Edition 9 Quick Start Guide

ProcedureTo Deploy the Hello Application Using Autodeploy

The server installation includes a pre-packaged application that says “Hello,” taken from The Java EE 5 Tutorial. The Hello application is contained in a Web ARchive (WAR) file in the samples directory. Packaged applications can also be in the form of a Java ARchive (JAR) or Enterprise ARchive (EAR) file.

Dragging or copying to a domain’s autodeploy directory lets you put a pre-packaged application into use immediately, with minimal effort.

  1. Find install-dir/samples/quickstart/hello.war.

  2. Copy hello.war to the install-dir/domains/domain1/autodeploy/ directory.


    Tip –

    On Windows, you can create a shortcut to the autodeploy directory on your desktop, and then drag and drop the hello.war file onto the shortcut.


    When the server has finished deploying the application, it creates a file named hello.war_deployed in the autodeploy directory. Depending on the speed of your system, the process can take a few seconds. Until that file appears, a 404-File Not Found error occurs when you try to visit the application page.

  3. Access this URL to visit the application page: http://localhost:8080/hello.

    You see the application’s first page, which prompts you to fill in your name:

    Displays message: Hi, my name is Duke. What's yours?
  4. Type your name and click Submit.

    The application displays a customized response, giving you a personal Hello.


    Note –

    You can also use the asadmin command-line utility to deploy from the command line or in a shell script. The command is asadmin deploy. For more information, see the deploy(1) command documentation in the Sun Java System Application Server Platform Edition 9 Reference Manual. Other deployment methods are discussed later in the Guide in To Deploy From the Admin Console, and To Deploy From a Development Directory. It is also possible to dynamically reload changes to your application. For more information, see Dynamic Reloading in Sun Java System Application Server Platform Edition 9 Application Deployment Guide.