Class TomcatWAR
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.deployable.AbstractDeployable
-
- org.codehaus.cargo.container.deployable.WAR
-
- org.codehaus.cargo.container.tomcat.TomcatWAR
-
- All Implemented Interfaces:
Deployable,Loggable
public class TomcatWAR extends WAR
Extension that supports custom Tomcatcontext.xmlfiles located in theMETA-INF/directory of your WAR. For example, this allows returning the right web context even if it has been defined in thecontext.xmlfile.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsContextFile()StringgetContext()StringparseTomcatContextXml()-
Methods inherited from class org.codehaus.cargo.container.deployable.WAR
getBaseFilename, getExtraClasspath, getFilename, getName, getType, setContext, setExtraClasspath
-
Methods inherited from class org.codehaus.cargo.container.spi.deployable.AbstractDeployable
equals, getFile, getFileHandler, getVersion, hashCode, isExpanded, setFileHandler, setLogger, setVersion, toString
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
-
-
-
-
Constructor Detail
-
TomcatWAR
public TomcatWAR(String war)
- Parameters:
war- the location of the WAR being wrapped. This must point to either a WAR file or an expanded WAR directory.
-
-
Method Detail
-
getContext
public String getContext()
- Overrides:
getContextin classWAR- Returns:
- the context defined in
context.xmlif any. If there is nocontext.xmlor if it doesn't define any root context, then returnWAR.getContext().
-
parseTomcatContextXml
public String parseTomcatContextXml()
- Returns:
- the context from Tomcat's
context.xmlif it is defined ornullotherwise.
-
containsContextFile
public boolean containsContextFile()
- Returns:
- true if the WAR contains a
META-INF/context.xmlfile
-
-