Class TomcatUtils
- java.lang.Object
-
- org.codehaus.cargo.container.tomcat.internal.TomcatUtils
-
public final class TomcatUtils extends Object
Utility methods for Tomcat.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontainsContextFile(Deployable deployable)Tests whether the specified deployable is a Tomcat WAR and contains aMETA-INF/context.xmlfile.static String[]getExtraClasspath(WAR war)Gets the extra classpath for the WAR as a string arraystatic StringgetExtraClasspath(WAR war, boolean xml)Gets the extra classpath for the WAR as a single string suitable for use within thecontext.xml.
-
-
-
Method Detail
-
containsContextFile
public static boolean containsContextFile(Deployable deployable)
Tests whether the specified deployable is a Tomcat WAR and contains aMETA-INF/context.xmlfile.- Parameters:
deployable- The deployable to test, may benull.- Returns:
trueif the deployable is a Tomcat WAR with a context file,falseotherwise.
-
getExtraClasspath
public static String getExtraClasspath(WAR war, boolean xml)
Gets the extra classpath for the WAR as a single string suitable for use within thecontext.xml.- Parameters:
war- The WAR being deployed, must not benull.xml-trueto escape XML markup in the result,falseto return a plain string.- Returns:
- The WAR's extra classpath or
nullif none.
-
-