Apache Tomcat 7.0.25

org.apache.catalina.util
Class ExtensionValidator

java.lang.Object
  extended by org.apache.catalina.util.ExtensionValidator

public final class ExtensionValidator
extends java.lang.Object

Ensures that all extension dependencies are resolved for a WEB application are met. This class builds a master list of extensions available to an application and then validates those extensions. See http://download.oracle.com/javase/1.4.2/docs/guide/extensions/spec.html for a detailed explanation of the extension mechanism in Java.

Version:
$Id: ExtensionValidator.java 1029527 2010-11-01 02:04:53Z markt $
Author:
Greg Murray, Justyna Horwat

Constructor Summary
ExtensionValidator()
           
 
Method Summary
static void addSystemResource(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 boolean validateApplication(javax.naming.directory.DirContext dirContext, Context context)
          Runtime validation of a Web Application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionValidator

public ExtensionValidator()
Method Detail

validateApplication

public static boolean validateApplication(javax.naming.directory.DirContext dirContext,
                                          Context context)
                                   throws java.io.IOException
Runtime validation of a Web Application. This method uses JNDI to look up the resources located under a DirContext. 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 an ArrayList of ManifestResorce objects. These objects are then passed to the validateManifestResources method for validation.

Parameters:
dirContext - The JNDI root of the Web Application
context - The context from which the Logger and path to the application
Returns:
true if all required extensions satisfied
Throws:
java.io.IOException

addSystemResource

public static void addSystemResource(java.io.File jarFile)
                              throws java.io.IOException
Checks 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

Apache Tomcat 7.0.25

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.