Sun GlassFish Enterprise Server v3 Prelude Quick Start Guide

Deploying an Application Automatically

To use automatic deployment, you can deploy applications by placing the applications in the as-install/domains/domain-name/autodeploy directory.

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.

  1. Create a directory named as-install/domains/domain-name/autodeploy

    domain-name is the name of the domain for which you want to configure automatic deployment. For this example, use the default domain1 domain:


    as-install/domains/domain1/autodeploy
  2. 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

    Enterprise Server automatically discovers and starts the application.

ProcedureTo Undeploy the Sample Application

    Use the cd command to change to the domain's autodeploy directory.

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

    Use the rm command to delete the application.

    rm hello.war