Sun Java System Application Server Platform Edition 8.2 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. 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.

  4. Issue the following command to deploy the application:

    asadmin deploydir install-dir/samples/quickstart/hello2

    Note –

    Specify the full path to the hello2/ directory.

    If you installed the Application Server with the “Prompt for Administration User Name” option, also specify the option --user username, where username is the admin user name. You are prompted for the password.

    The following message appears: Command deploydir executed successfully.

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

Next Steps

You have completed the second section of the Quick Start Guide. See Using Command-Line Tools for more information on the command-line tools available in Application Server. See Where to Go Next for information on other resources for learning about Application Server.