org.codehaus.cargo.container.tomcat
Class TomcatWAR

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.deployable.AbstractDeployable
          extended by org.codehaus.cargo.container.deployable.WAR
              extended by org.codehaus.cargo.container.tomcat.TomcatWAR
All Implemented Interfaces:
Deployable, Loggable

public class TomcatWAR
extends WAR

Extension that supports custom Tomcat context.xml files located in the META-INF/ directory of your WAR. For example, this allows returning the right web context even if it has been defined in the context.xml file.

Version:
$Id: TomcatWAR.java 1705 2008-09-02 13:14:55Z adriana $

Constructor Summary
TomcatWAR(String war)
           
 
Method Summary
 boolean containsContextFile()
           
 String getContext()
           
 
Methods inherited from class org.codehaus.cargo.container.deployable.WAR
getType, isExpandedWar, setContext
 
Methods inherited from class org.codehaus.cargo.container.spi.deployable.AbstractDeployable
getFile, getFileHandler, isExpanded, setFileHandler
 
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 

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 class WAR
Returns:
the context defined in context.xml if any. If there is no context.xml or if it doesn't define any root context, then return WAR.getContext().

containsContextFile

public boolean containsContextFile()
Returns:
true if the WAR contains a META-INF/context.xml file


Copyright © 2004-2012 Codehaus. All Rights Reserved.