org.apache.catalina.startup

Class ExpandWar


public class ExpandWar
extends java.lang.Object

Expand out a WAR in a Host's appBase.

Version:
$Revision: 1.5 $

Authors:
Craig R. McClanahan
Remy Maucherat
Glenn L. Nielsen

Field Summary

protected static StringManager
sm
The string resources for this package.

Method Summary

static void
deleteDir(File dir)
Delete the specified directory, including all of its contents and subdirectories recursively.
protected static void
expand(InputStream input, File docBase, String name)
Expand the specified input stream into the specified directory, creating a file named from the specified relative path.
static String
expand(Host host, URL war)
Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.
static String
expand(Host host, URL war, String pathname)
Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.

Field Details

sm

protected static final StringManager sm
The string resources for this package.

Method Details

deleteDir

public static void deleteDir(File dir)
Delete the specified directory, including all of its contents and subdirectories recursively.

Parameters:
dir - File object representing the directory to be deleted


expand

protected static void expand(InputStream input,
                             File docBase,
                             String name)
            throws IOException
Expand the specified input stream into the specified directory, creating a file named from the specified relative path.

Parameters:
input - InputStream to be copied
docBase - Document base directory into which we are expanding
name - Relative pathname of the file to be created


expand

public static String expand(Host host,
                            URL war)
            throws IOException
Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.

Parameters:
host - Host war is being installed for
war - URL of the web application archive to be expanded (must start with "jar:")


expand

public static String expand(Host host,
                            URL war,
                            String pathname)
            throws IOException
Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.

Parameters:
host - Host war is being installed for
war - URL of the web application archive to be expanded (must start with "jar:")
pathname - Context path name for web application


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.