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, instead of using the deploytool utility, 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, since most developers want to automate the procedure in command scripts.
In the install_dir/samples/quickstart/ directory, create a new directory called build/.
Unzip the contents of the hello.war file into the build/ 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.
If you already have an application hello deployed, undeploy it now using the command asadmin undeploy hello.
Issue the following command to deploy the application:
asadmin deploydir install_dir/samples/quickstart/build
Specify the full path to the build/ directory.
If you did not install the Application Server with the “Don’t prompt” option, also specify --user username --password password, where username is the admin user name and password is the admin password.
Verify that this message appears to confirm that the redeployment succeeded:
Command deploydir executed successfully.
Verify that the application is running by going to this URL: http://localhost:8080/hello.