Package org.apache.catalina.startup
Class ExpandWar
- java.lang.Object
- 
- org.apache.catalina.startup.ExpandWar
 
- 
 public class ExpandWar extends java.lang.ObjectExpand out a WAR in a Host's appBase.- Author:
- Craig R. McClanahan, Remy Maucherat, Glenn L. Nielsen
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringManagersmThe string resources for this package.
 - 
Constructor SummaryConstructors Constructor Description ExpandWar()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancopy(java.io.File src, java.io.File dest)Copy the specified file or directory to the destination.static booleandelete(java.io.File dir)Delete the specified directory, including all of its contents and sub-directories recursively.static booleandelete(java.io.File dir, boolean logFailure)Delete the specified directory, including all of its contents and sub-directories recursively.static booleandeleteDir(java.io.File dir)Delete the specified directory, including all of its contents and sub-directories recursively.static booleandeleteDir(java.io.File dir, boolean logFailure)Delete the specified directory, including all of its contents and sub-directories recursively.static java.lang.Stringexpand(Host host, java.net.URL war, java.lang.String pathname)Expand the WAR file found at the specified URL into an unpacked directory structure.static voidvalidate(Host host, java.net.URL war, java.lang.String pathname)Validate the WAR file found at the specified URL.
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm The string resources for this package.
 
- 
 - 
Method Detail- 
expandpublic static java.lang.String expand(Host host, java.net.URL war, java.lang.String pathname) throws java.io.IOException Expand the WAR file found at the specified URL into an unpacked directory structure.- 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
- Returns:
- The absolute path to the expanded directory foe the given WAR
- Throws:
- java.lang.IllegalArgumentException- if this is not a "jar:" URL or if the WAR file is invalid
- java.io.IOException- if an input/output error was encountered during expansion
 
 - 
validatepublic static void validate(Host host, java.net.URL war, java.lang.String pathname) throws java.io.IOException Validate the WAR file found at the specified URL.- Parameters:
- host- Host war is being installed for
- war- URL of the web application archive to be validated (must start with "jar:")
- pathname- Context path name for web application
- Throws:
- java.lang.IllegalArgumentException- if this is not a "jar:" URL or if the WAR file is invalid
- java.io.IOException- if an input/output error was encountered during validation
 
 - 
copypublic static boolean copy(java.io.File src, java.io.File dest)Copy the specified file or directory to the destination.- Parameters:
- src- File object representing the source
- dest- File object representing the destination
- Returns:
- trueif the copy was successful
 
 - 
deletepublic static boolean delete(java.io.File dir) 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:
- trueif the deletion was successful
 
 - 
deletepublic static boolean delete(java.io.File dir, boolean logFailure)Delete the specified directory, including all of its contents and sub-directories recursively.- Parameters:
- dir- File object representing the directory to be deleted
- logFailure-- trueif failure to delete the resource should be logged
- Returns:
- trueif the deletion was successful
 
 - 
deleteDirpublic static boolean deleteDir(java.io.File dir) 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:
- trueif the deletion was successful
 
 - 
deleteDirpublic static boolean deleteDir(java.io.File dir, boolean logFailure)Delete the specified directory, including all of its contents and sub-directories recursively.- Parameters:
- dir- File object representing the directory to be deleted
- logFailure-- trueif failure to delete the resource should be logged
- Returns:
- trueif the deletion was successful
 
 
- 
 
-