Sun GlassFish Enterprise Server v3 Quick Start Guide

Deploying an Application Automatically

You can deploy applications automatically by placing them in the as-install/domains/domain-name/autodeploy directory, where domain-name is the name of the domain for which you want to configure automatic deployment. For this example, use the default domain, domain1:


as-install/domains/domain1/autodeploy

ProcedureTo Deploy the Sample Application Automatically

Before You Begin

The sample application must be available before you start this task. To download the sample, see Obtaining a Sample Application.

    Copy the application WAR file to the as-install/domains/domain-name/autodeploy directory.

    cp sample-dir/hello.war as-install/domains/domain-name/autodeploy

    Use copy instead of cp on Windows systems.

    Enterprise Server automatically discovers and deploys the application. The default URL for the application is:


    http://localhost:8080/hello/
    

ProcedureTo Undeploy the Sample Application Automatically

    Change to the domain's autodeploy directory.

    cd as-install/domains/domain-name/autodeploy

    Use the rm command to undeploy and remove the application.

    rm hello.war

    Use del instead of rm on Windows systems.