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 boolean
containsContextFile(Deployable deployable)
Tests whether the specified deployable is a Tomcat WAR and contains aMETA-INF/context.xml
file.static String[]
getExtraClasspath(WAR war)
Gets the extra classpath for the WAR as a string arraystatic String
getExtraClasspath(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.xml
file.- Parameters:
deployable
- The deployable to test, may benull
.- Returns:
true
if the deployable is a Tomcat WAR with a context file,false
otherwise.
-
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
-true
to escape XML markup in the result,false
to return a plain string.- Returns:
- The WAR's extra classpath or
null
if none.
-
-