Class ExpandWar
java.lang.Object
org.apache.catalina.startup.ExpandWar
Expand out a WAR in a Host's appBase.
- Author:
- Craig R. McClanahan, Remy Maucherat, Glenn L. Nielsen
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final StringManager
The string resources for this package. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Copy the specified file or directory to the destination.static boolean
Delete the specified directory, including all of its contents and sub-directories recursively.static boolean
Delete the specified directory, including all of its contents and sub-directories recursively.static boolean
Delete the specified directory, including all of its contents and sub-directories recursively.static boolean
Delete the specified directory, including all of its contents and sub-directories recursively.static String
Expand the WAR file found at the specified URL into an unpacked directory structure.static void
Validate the WAR file found at the specified URL.
-
Field Details
-
sm
The string resources for this package.
-
-
Constructor Details
-
ExpandWar
public ExpandWar()
-
-
Method Details
-
expand
Expand the WAR file found at the specified URL into an unpacked directory structure.- Parameters:
host
- Host war is being installed forwar
- URL of the web application archive to be expanded (must start with "jar:")pathname
- Context path name for web application- Returns:
- The absolute path to the expanded directory for the given WAR
- Throws:
IllegalArgumentException
- if this is not a "jar:" URL or if the WAR file is invalidIOException
- if an input/output error was encountered during expansion
-
validate
Validate the WAR file found at the specified URL.- Parameters:
host
- Host war is being installed forwar
- URL of the web application archive to be validated (must start with "jar:")pathname
- Context path name for web application- Throws:
IllegalArgumentException
- if this is not a "jar:" URL or if the WAR file is invalidIOException
- if an input/output error was encountered during validation
-
copy
-
delete
Delete the specified directory, including all of its contents and sub-directories recursively. Any failure will be logged.- Parameters:
dir
- File object representing the directory to be deleted- Returns:
true
if the deletion was successful
-
delete
Delete the specified directory, including all of its contents and sub-directories recursively.- Parameters:
dir
- File object representing the directory to be deletedlogFailure
-true
if failure to delete the resource should be logged- Returns:
true
if the deletion was successful
-
deleteDir
Delete the specified directory, including all of its contents and sub-directories recursively. Any failure will be logged.- Parameters:
dir
- File object representing the directory to be deleted- Returns:
true
if the deletion was successful
-
deleteDir
Delete the specified directory, including all of its contents and sub-directories recursively.- Parameters:
dir
- File object representing the directory to be deletedlogFailure
-true
if failure to delete the resource should be logged- Returns:
true
if the deletion was successful
-