Oracle GlassFish Server 3.0.1 Application Deployment Guide

ProcedureTo Deploy an Application or Module in a Directory Format

Note –

This task is best suited for use in a development environment.

An expanded directory, also known as an exploded directory, contains an unassembled (unpackaged) application or module. To deploy a directory format instead of an archive, use the asadmin deploy subcommand in remote mode and specify a path to a directory instead of to an archive file. The contents of the directory must be the same as the contents of a corresponding archive file. The directories that hold modules must be named with suffixes that identify the type of archive that the structure is based on, such as _jar or _war.

You can change deployment descriptor files directly in the expanded directory.

If your environment is configured to use dynamic reloading, you can also dynamically reload applications or modules that are deployed from the directory. For instructions, see To Reload Changes to Applications or Modules Dynamically.

Before You Begin

The directory must be accessible to the machine on which GlassFish Server runs.

On Windows, if you are deploying a directory on a mapped drive, you must be running GlassFish Server as the same user to which the mapped drive is assigned. This enables GlassFish Server to access the directory.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Verify that the expanded directory contents match the archive file.

    For information about the required directory contents, see the appropriate specifications.

  3. Deploy the directory by using the deploy(1) subcommand and specifying the path to the expanded directory.

    Note –

    Deployment directories might change between GlassFish Server releases.

Example 2–20 Deploying an Application From a Directory

This example deploys the expanded directory for the hello application. The path name is stored in the domain configuration file (domain.xml).

asadmin> deploy --name hello
Application deployed successfully with name hello.
Command deploy executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help deploy at the command line.