Package org.apache.catalina.util
Class ExtensionValidator
- java.lang.Object
-
- org.apache.catalina.util.ExtensionValidator
-
public final class ExtensionValidator extends java.lang.ObjectEnsures that all extension dependencies are resolved for a WEB application are met. This class builds a list of extensions available to an application and then validates those extensions. See http://docs.oracle.com/javase/1.4.2/docs/guide/extensions/spec.html for a detailed explanation of the extension mechanism in Java.- Author:
- Greg Murray, Justyna Horwat
-
-
Constructor Summary
Constructors Constructor Description ExtensionValidator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddSystemResource(java.io.File jarFile)Checks to see if the given system JAR file contains a MANIFEST, and adds it to the container's manifest resources.static booleanvalidateApplication(WebResourceRoot resources, Context context)Runtime validation of a Web Application.
-
-
-
Method Detail
-
validateApplication
public static boolean validateApplication(WebResourceRoot resources, Context context) throws java.io.IOException
Runtime validation of a Web Application. This method uses JNDI to look up the resources located under aDirContext. It locates Web Application MANIFEST.MF file in the /META-INF/ directory of the application and all MANIFEST.MF files in each JAR file located in the WEB-INF/lib directory and creates anArrayListofManifestResourceobjects. These objects are then passed to the validateManifestResources method for validation.- Parameters:
resources- The resources configured for this Web Applicationcontext- The context from which the Logger and path to the application- Returns:
- true if all required extensions satisfied
- Throws:
java.io.IOException- Error reading resources needed for validation
-
addSystemResource
public static void addSystemResource(java.io.File jarFile) throws java.io.IOExceptionChecks to see if the given system JAR file contains a MANIFEST, and adds it to the container's manifest resources.- Parameters:
jarFile- The system JAR whose manifest to add- Throws:
java.io.IOException- Error reading JAR file
-
-