Sun Java System Application Server Platform Edition 9 Quick Start Guide

ProcedureTo Deploy From a Development Directory

You can deploy an application directly from a development directory, if the appropriate directory hierarchy and deployment descriptors have been created. This directory must be accessible from the machine where Application Server is installed. Because the process is complex for non-trivial applications, it is a procedure that is recommended only for advanced users, or simple applications. But when it is feasible to do so, deploying directly from a directory can speed up the development cycle.

The process can be performed interactively by using the Admin Console, or by using asadmin deploydir from the command line or in a script. The steps for the command line are presented here, because most developers want to automate the procedure in command scripts.


Note –

Before using asadmin on Windows, see To Configure the Windows Environment to Use the Command-Line Tools.


  1. In the install-dir/samples/quickstart/ directory, create a new directory called hello2/.

  2. Unzip the contents of the hello.war file into the hello2/ directory.

    Preserve the directory structure of the hello.war file when you unzip it. It is a template for the kind of file structure you need to deploy directly from a directory.

  3. If you already have a Hello application deployed, undeploy it now using the command asadmin undeploy hello at the command line.

    If you did not install the Application Server with the “Don’t prompt” option, also specify the option --user username, where username is the admin user name. You are prompted for the administration password.

  4. Use the following command to deploy the application:

    asadmin deploydir install-dir/samples/quickstart/hello2


    Note –

    Specify the full path to the hello2/ directory.


    The following message appears: Command deploydir executed successfully.

  5. Verify that the application is running by going to this URL: http://localhost:8080/hello.