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.xml
files 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.xml
file.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsContextFile()
String
getContext()
String
parseTomcatContextXml()
-
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:
getContext
in classWAR
- Returns:
- the context defined in
context.xml
if any. If there is nocontext.xml
or if it doesn't define any root context, then returnWAR.getContext()
.
-
parseTomcatContextXml
public String parseTomcatContextXml()
- Returns:
- the context from Tomcat's
context.xml
if it is defined ornull
otherwise.
-
containsContextFile
public boolean containsContextFile()
- Returns:
- true if the WAR contains a
META-INF/context.xml
file
-
-