cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2004-10-06 Thread remm
remm2004/10/06 09:11:17

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  - Update JAR list.
  
  Revision  ChangesPath
  1.44  +22 -21
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TldConfig.java6 Sep 2004 15:02:07 -   1.43
  +++ TldConfig.java6 Oct 2004 16:11:17 -   1.44
  @@ -75,45 +75,46 @@
*/
   static {
   noTldJars = new HashSet();
  -noTldJars.add(ant.jar);
   noTldJars.add(catalina.jar);
   noTldJars.add(catalina-ant.jar);
   noTldJars.add(catalina-cluster.jar);
   noTldJars.add(catalina-optional.jar);
  -noTldJars.add(catalina-i18n-fr.jar);
  -noTldJars.add(catalina-i18n-ja.jar);
  -noTldJars.add(catalina-i18n-es.jar);
  -noTldJars.add(commons-dbcp.jar);
  -noTldJars.add(commons-modeler.jar);
  -noTldJars.add(commons-logging-api.jar);
  -noTldJars.add(commons-beanutils.jar);
  -noTldJars.add(commons-fileupload-1.0.jar);
  -noTldJars.add(commons-pool.jar);
  -noTldJars.add(commons-digester.jar);
  -noTldJars.add(commons-logging.jar);
  -noTldJars.add(commons-collections.jar);
   noTldJars.add(commons-el.jar);
  -noTldJars.add(jakarta-regexp-1.3.jar);
  +noTldJars.add(commons-logging-api.jar);
  +noTldJars.add(commons-modeler.jar);
   noTldJars.add(jasper-compiler.jar);
   noTldJars.add(jasper-compiler-jdt.jar);
   noTldJars.add(jasper-runtime.jar);
  -noTldJars.add(jmx.jar);
  -noTldJars.add(jmx-tools.jar);
   noTldJars.add(jsp-api.jar);
  -noTldJars.add(naming-common.jar);
   noTldJars.add(naming-resources.jar);
   noTldJars.add(naming-factory.jar);
   noTldJars.add(naming-factory-dbcp.jar);
  -noTldJars.add(naming-java.jar);
   noTldJars.add(servlet-api.jar);
  +noTldJars.add(servlets-cgi.jar);
   noTldJars.add(servlets-default.jar);
   noTldJars.add(servlets-invoker.jar);
  -noTldJars.add(servlets-common.jar);
  +noTldJars.add(servlets-ssi.jar);
   noTldJars.add(servlets-webdav.jar);
  -noTldJars.add(tomcat-util.jar);
  -noTldJars.add(tomcat-http11.jar);
   noTldJars.add(tomcat-ajp.jar);
   noTldJars.add(tomcat-coyote.jar);
  +noTldJars.add(tomcat-http.jar);
  +noTldJars.add(tomcat-util.jar);
  +// i18n JARs
  +noTldJars.add(catalina-i18n-en.jar);
  +noTldJars.add(catalina-i18n-es.jar);
  +noTldJars.add(catalina-i18n-fr.jar);
  +noTldJars.add(catalina-i18n-ja.jar);
  +// Misc JARs not included with Tomcat
  +noTldJars.add(ant.jar);
  +noTldJars.add(commons-dbcp.jar);
  +noTldJars.add(commons-beanutils.jar);
  +noTldJars.add(commons-fileupload-1.0.jar);
  +noTldJars.add(commons-pool.jar);
  +noTldJars.add(commons-digester.jar);
  +noTldJars.add(commons-logging.jar);
  +noTldJars.add(commons-collections.jar);
  +noTldJars.add(jmx.jar);
  +noTldJars.add(jmx-tools.jar);
   noTldJars.add(xercesImpl.jar);
   noTldJars.add(xmlParserAPIs.jar);
   noTldJars.add(xml-apis.jar);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2004-05-26 Thread yoavs
yoavs   2004/05/26 09:16:56

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Minor JavaDoc fixes (Bugzilla 28335)
  
  Revision  ChangesPath
  1.38  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- TldConfig.java24 Mar 2004 20:00:22 -  1.37
  +++ TldConfig.java26 May 2004 16:16:56 -  1.38
  @@ -183,7 +183,7 @@
   /**
* Set the validation feature of the XML parser used when
* parsing xml instances.
  - * @param xmlValidation true to enable xml instance validation
  + * @param tldValidation true to enable xml instance validation
*/
   public void setTldValidation(boolean tldValidation){
   this.tldValidation = tldValidation;
  @@ -211,7 +211,7 @@
   /**
* Set the namespace aware feature of the XML parser used when
* parsing xml instances.
  - * @param xmlNamespaceAware true to enable namespace awareness
  + * @param tldNamespaceAware true to enable namespace awareness
*/
   public void setTldNamespaceAware(boolean tldNamespaceAware){
   this.tldNamespaceAware = tldNamespaceAware;
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java CatalinaProperties.java catalina.properties

2003-09-26 Thread luehe
luehe   2003/09/26 12:31:16

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java CatalinaProperties.java
catalina.properties
  Log:
  Reverted patch for JAR exclusion list
  
  Revision  ChangesPath
  1.30  +6 -39 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TldConfig.java25 Sep 2003 19:27:59 -  1.29
  +++ TldConfig.java26 Sep 2003 19:31:16 -  1.30
  @@ -108,31 +108,12 @@
*/
   public final class TldConfig  {
   
  -// Names of JARs that are known not to contain any TLDs
  -private static HashSet noTldJars;
  -
   private static org.apache.commons.logging.Log log=
   org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
   
   private static final String FILE_URL_PREFIX = file:;
   private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
   
  -
  -/*
  - * Initializes the set of JARs that are known not to contain any TLDs
  - */
  -static {
  -String value = CatalinaProperties.getProperty(noTldJars);
  -if (value != null) {
  -noTldJars = new HashSet();
  -StringTokenizer tokenizer = new StringTokenizer(value, ,);
  -while (tokenizer.hasMoreElements()) {
  -noTldJars.add(tokenizer.nextToken());
  -}
  -}
  -}
  -
  -
   // - Instance Variables
   
   /**
  @@ -752,19 +733,13 @@
* location that all web applications have access to (e.g.,
* CATALINA_HOME/common/lib).
*
  - * The set of shared JARs to be scanned for TLDs is narrowed down by
  - * the list of JARs specified as the value of the ttnoTldJars/tt
  - * property in catalina.properties, which are known not to contain any 
  - * TLDs.
  - *
* @return Map of JAR file paths
*/
   private Map getJarPaths() {
   
   HashMap jarPathMap = null;
   
  -ClassLoader webappLoader = Thread.currentThread().getContextClassLoader();
  -ClassLoader loader = webappLoader;
  +ClassLoader loader = Thread.currentThread().getContextClassLoader();
   while (loader != null) {
   if (loader instanceof URLClassLoader) {
   URL[] urls = ((URLClassLoader) loader).getURLs();
  @@ -786,19 +761,11 @@
   if (!path.endsWith(.jar)) {
   continue;
   }
  -/*
  - * Scan all JARs from WEB-INF/lib, plus any shared JARs
  - * that are not known not to contain any TLDs
  - */
  -if (loader == webappLoader
  -|| noTldJars == null
  -|| !noTldJars.contains(file.getName())) {
  -if (jarPathMap == null) {
  -jarPathMap = new HashMap();
  -jarPathMap.put(path, file);
  -} else if (!jarPathMap.containsKey(path)) {
  -jarPathMap.put(path, file);
  -}
  +if (jarPathMap == null) {
  +jarPathMap = new HashMap();
  +jarPathMap.put(path, file);
  +} else if (!jarPathMap.containsKey(path)) {
  +jarPathMap.put(path, file);
   }
   }
   }
  
  
  
  1.3   +4 -17 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java
  
  Index: CatalinaProperties.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CatalinaProperties.java   24 Sep 2003 19:09:29 -  1.2
  +++ CatalinaProperties.java   26 Sep 2003 19:31:16 -  1.3
  @@ -117,19 +117,6 @@
   }
   
   
  -/**
  - * Sets the property with the specified key to the specified value.
  - *
  - * @param key the property key
  - * @param value the property value
  - * @return the previous value of the specified key in the property
  - * list, or codenull/code if it did not have one.
  - */
  -public static Object setProperty(String key, String value) {
  -return properties.setProperty(key, value);
  -}
  -
  -

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-26 Thread luehe
luehe   2003/09/26 16:09:08

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Added hard-coded list of names of JARs that are known not to contain any TLDs.
  This list can be overridden using the new TldConfig.setNoTldJars().
  
  Revision  ChangesPath
  1.31  +96 -7 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- TldConfig.java26 Sep 2003 19:31:16 -  1.30
  +++ TldConfig.java26 Sep 2003 23:09:08 -  1.31
  @@ -108,12 +108,72 @@
*/
   public final class TldConfig  {
   
  +// Names of JARs that are known not to contain any TLDs
  +private static HashSet noTldJars;
  +
   private static org.apache.commons.logging.Log log=
   org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
   
   private static final String FILE_URL_PREFIX = file:;
   private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
   
  +
  +/*
  + * Initializes the set of JARs that are known not to contain any TLDs
  + */
  +static {
  +noTldJars = new HashSet();
  +noTldJars.add(ant.jar);
  +noTldJars.add(catalina.jar);
  +noTldJars.add(catalina-ant.jar);
  +noTldJars.add(catalina-cluster.jar);
  +noTldJars.add(catalina-optional.jar);
  +noTldJars.add(catalina-i18n-fr.jar);
  +noTldJars.add(catalina-i18n-ja.jar);
  +noTldJars.add(catalina-i18n-es.jar);
  +noTldJars.add(commons-dbcp.jar);
  +noTldJars.add(commons-modeler.jar);
  +noTldJars.add(commons-logging-api.jar);
  +noTldJars.add(commons-beanutils.jar);
  +noTldJars.add(commons-fileupload-1.0.jar);
  +noTldJars.add(commons-pool.jar);
  +noTldJars.add(commons-digester.jar);
  +noTldJars.add(commons-logging.jar);
  +noTldJars.add(commons-collections.jar);
  +noTldJars.add(commons-el.jar);
  +noTldJars.add(jakarta-regexp-1.2.jar);
  +noTldJars.add(jasper-compiler.jar);
  +noTldJars.add(jasper-runtime.jar);
  +noTldJars.add(jmx.jar);
  +noTldJars.add(jmx-tools.jar);
  +noTldJars.add(jsp-api.jar);
  +noTldJars.add(jkshm.jar);
  +noTldJars.add(jkconfig.jar);
  +noTldJars.add(naming-common.jar);
  +noTldJars.add(naming-resources.jar);
  +noTldJars.add(naming-factory.jar);
  +noTldJars.add(naming-java.jar);
  +noTldJars.add(servlet-api.jar);
  +noTldJars.add(servlets-default.jar);
  +noTldJars.add(servlets-invoker.jar);
  +noTldJars.add(servlets-common.jar);
  +noTldJars.add(servlets-webdav.jar);
  +noTldJars.add(tomcat-util.jar);
  +noTldJars.add(tomcat-http11.jar);
  +noTldJars.add(tomcat-jni.jar);
  +noTldJars.add(tomcat-jk.jar);
  +noTldJars.add(tomcat-jk2.jar);
  +noTldJars.add(tomcat-coyote.jar);
  +noTldJars.add(xercesImpl.jar);
  +noTldJars.add(xmlParserAPIs.jar);
  +// JARs from J2SE runtime
  +noTldJars.add(sunjce_provider.jar);
  +noTldJars.add(ldapsec.jar);
  +noTldJars.add(localedata.jar);
  +noTldJars.add(dnsns.jar);
  +}
  +
  +
   // - Instance Variables
   
   /**
  @@ -152,7 +212,23 @@
   
   // - Public Methods
   
  - /**
  +/**
  + * Sets the list of JARs that are known not to contain any TLDs.
  + *
  + * @param jarNames List of comma-separated names of JAR files that are 
  + * known not to contain any TLDs 
  + */
  +public static void setNoTldJars(String jarNames) {
  +if (jarNames != null) {
  +noTldJars.clear();
  +StringTokenizer tokenizer = new StringTokenizer(jarNames, ,);
  +while (tokenizer.hasMoreElements()) {
  +noTldJars.add(tokenizer.nextToken());
  +}
  +}
  +}
  +
  +/**
* Set the validation feature of the XML parser used when
* parsing xml instances.
* @param xmlValidation true to enable xml instance validation
  @@ -733,13 +809,18 @@
* location that all web applications have access to (e.g.,
* CATALINA_HOME/common/lib).
*
  + * The set of shared JARs to be scanned for TLDs is narrowed down by
  + * the ttnoTldJars/tt class variable, which contains the names of JARs
  + * that are known not to contain any TLDs.
  + *
* @return Map of JAR file paths
*/

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-23 Thread luehe
luehe   2003/09/23 11:48:36

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Do not search *shared* JARs that are known not to contain any TLDs for TLDs.
  JARs in WEB-INF/lib are *always* searched, as mandated by the spec.
  
  Revision  ChangesPath
  1.25  +81 -10
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TldConfig.java23 Sep 2003 18:43:12 -  1.24
  +++ TldConfig.java23 Sep 2003 18:48:36 -  1.25
  @@ -96,6 +96,7 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
  +
   /**
* Startup event listener for a bContext/b that configures the properties
* of that Context, and the associated defined servlets.
  @@ -106,12 +107,72 @@
*/
   public final class TldConfig  {
   
  +// Set of JARs that are known not to contain any TLDs
  +private static HashSet noTldJars;
  +
   private static org.apache.commons.logging.Log log=
   org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
   
   private static final String FILE_URL_PREFIX = file:;
   private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
   
  +
  +/*
  + * Initializes the set of JARs that are known not to contain any TLDs
  + */
  +static {
  +noTldJars = new HashSet();
  +noTldJars.add(ant.jar);
  +noTldJars.add(catalina.jar);
  +noTldJars.add(catalina-ant.jar);
  +noTldJars.add(catalina-cluster.jar);
  +noTldJars.add(catalina-optional.jar);
  +noTldJars.add(catalina-i18n-fr.jar);
  +noTldJars.add(catalina-i18n-ja.jar);
  +noTldJars.add(catalina-i18n-es.jar);
  +noTldJars.add(commons-dbcp.jar);
  +noTldJars.add(commons-modeler.jar);
  +noTldJars.add(commons-logging-api.jar);
  +noTldJars.add(commons-beanutils.jar);
  +noTldJars.add(commons-fileupload-1.0.jar);
  +noTldJars.add(commons-pool.jar);
  +noTldJars.add(commons-digester.jar);
  +noTldJars.add(commons-logging.jar);
  +noTldJars.add(commons-collections.jar);
  +noTldJars.add(commons-el.jar);
  +noTldJars.add(jakarta-regexp-1.2.jar);
  +noTldJars.add(jasper-compiler.jar);
  +noTldJars.add(jasper-runtime.jar);
  +noTldJars.add(jmx.jar);
  +noTldJars.add(jmx-tools.jar);
  +noTldJars.add(jsp-api.jar);
  +noTldJars.add(jkshm.jar);
  +noTldJars.add(jkconfig.jar);
  +noTldJars.add(naming-common.jar);
  +noTldJars.add(naming-resources.jar);
  +noTldJars.add(naming-factory.jar);
  +noTldJars.add(naming-java.jar);
  +noTldJars.add(servlet-api.jar);
  +noTldJars.add(servlets-default.jar);
  +noTldJars.add(servlets-invoker.jar);
  +noTldJars.add(servlets-common.jar);
  +noTldJars.add(servlets-webdav.jar);
  +noTldJars.add(tomcat-util.jar);
  +noTldJars.add(tomcat-http11.jar);
  +noTldJars.add(tomcat-jni.jar);
  +noTldJars.add(tomcat-jk.jar);
  +noTldJars.add(tomcat-jk2.jar);
  +noTldJars.add(tomcat-coyote.jar);
  +noTldJars.add(xercesImpl.jar);
  +noTldJars.add(xmlParserAPIs.jar);
  +// JARs from J2SE runtime
  +noTldJars.add(sunjce_provider.jar);
  +noTldJars.add(ldapsec.jar);
  +noTldJars.add(localedata.jar);
  +noTldJars.add(dnsns.jar);
  +}
  +
  +
   // - Instance Variables
   
   /**
  @@ -720,7 +781,8 @@
   
   HashMap jarPathMap = null;
   
  -ClassLoader loader = Thread.currentThread().getContextClassLoader();
  +ClassLoader webappLoader = Thread.currentThread().getContextClassLoader();
  +ClassLoader loader = webappLoader;
   while (loader != null) {
   if (loader instanceof URLClassLoader) {
   URL[] urls = ((URLClassLoader) loader).getURLs();
  @@ -735,15 +797,24 @@
   } catch (IOException e) {
   // Ignore
   }
  -if (file.exists()) {
  -String path = file.getAbsolutePath();
  -if (path.endsWith(.jar)) {
  -if (jarPathMap == null) {
  -jarPathMap = new HashMap();
  -jarPathMap.put(path, file);
  -} else if (!jarPathMap.containsKey(path)) {
 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java catalina.properties

2003-09-23 Thread luehe
luehe   2003/09/23 12:47:52

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java catalina.properties
  Log:
  Made noTldJars are configurable property in catalina.properties, as suggested by 
Jeanfrancois Arcand
  
  Revision  ChangesPath
  1.26  +11 -50
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- TldConfig.java23 Sep 2003 18:48:36 -  1.25
  +++ TldConfig.java23 Sep 2003 19:47:52 -  1.26
  @@ -77,6 +77,7 @@
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Set;
  +import java.util.StringTokenizer;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
   
  @@ -107,7 +108,7 @@
*/
   public final class TldConfig  {
   
  -// Set of JARs that are known not to contain any TLDs
  +// Names of JARs that are known not to contain any TLDs
   private static HashSet noTldJars;
   
   private static org.apache.commons.logging.Log log=
  @@ -121,55 +122,14 @@
* Initializes the set of JARs that are known not to contain any TLDs
*/
   static {
  -noTldJars = new HashSet();
  -noTldJars.add(ant.jar);
  -noTldJars.add(catalina.jar);
  -noTldJars.add(catalina-ant.jar);
  -noTldJars.add(catalina-cluster.jar);
  -noTldJars.add(catalina-optional.jar);
  -noTldJars.add(catalina-i18n-fr.jar);
  -noTldJars.add(catalina-i18n-ja.jar);
  -noTldJars.add(catalina-i18n-es.jar);
  -noTldJars.add(commons-dbcp.jar);
  -noTldJars.add(commons-modeler.jar);
  -noTldJars.add(commons-logging-api.jar);
  -noTldJars.add(commons-beanutils.jar);
  -noTldJars.add(commons-fileupload-1.0.jar);
  -noTldJars.add(commons-pool.jar);
  -noTldJars.add(commons-digester.jar);
  -noTldJars.add(commons-logging.jar);
  -noTldJars.add(commons-collections.jar);
  -noTldJars.add(commons-el.jar);
  -noTldJars.add(jakarta-regexp-1.2.jar);
  -noTldJars.add(jasper-compiler.jar);
  -noTldJars.add(jasper-runtime.jar);
  -noTldJars.add(jmx.jar);
  -noTldJars.add(jmx-tools.jar);
  -noTldJars.add(jsp-api.jar);
  -noTldJars.add(jkshm.jar);
  -noTldJars.add(jkconfig.jar);
  -noTldJars.add(naming-common.jar);
  -noTldJars.add(naming-resources.jar);
  -noTldJars.add(naming-factory.jar);
  -noTldJars.add(naming-java.jar);
  -noTldJars.add(servlet-api.jar);
  -noTldJars.add(servlets-default.jar);
  -noTldJars.add(servlets-invoker.jar);
  -noTldJars.add(servlets-common.jar);
  -noTldJars.add(servlets-webdav.jar);
  -noTldJars.add(tomcat-util.jar);
  -noTldJars.add(tomcat-http11.jar);
  -noTldJars.add(tomcat-jni.jar);
  -noTldJars.add(tomcat-jk.jar);
  -noTldJars.add(tomcat-jk2.jar);
  -noTldJars.add(tomcat-coyote.jar);
  -noTldJars.add(xercesImpl.jar);
  -noTldJars.add(xmlParserAPIs.jar);
  -// JARs from J2SE runtime
  -noTldJars.add(sunjce_provider.jar);
  -noTldJars.add(ldapsec.jar);
  -noTldJars.add(localedata.jar);
  -noTldJars.add(dnsns.jar);
  +String value = CatalinaProperties.getProperty(noTldJars);
  +if (value != null) {
  +noTldJars = new HashSet();
  +StringTokenizer tokenizer = new StringTokenizer(value, ,);
  +while (tokenizer.hasMoreElements()) {
  +noTldJars.add(tokenizer.nextToken());
  +}
  +}
   }
   
   
  @@ -809,6 +769,7 @@
* that are not known not to contain any TLDs
*/
   if (loader == webappLoader
  +|| noTldJars == null
   || !noTldJars.contains(file.getName())) {
   if (jarPathMap == null) {
   jarPathMap = new HashMap();
  
  
  
  1.3   +5 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/catalina.properties
  
  Index: catalina.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/catalina.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- catalina.properties   5 Nov 2002 08:07:46 -   1.2
  +++ catalina.properties   23 Sep 2003 19:47:52 -  1.3
  @@ -53,3 +53,8 @@
   #  

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-23 Thread luehe
luehe   2003/09/23 13:06:07

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  improved javadocs
  
  Revision  ChangesPath
  1.27  +10 -3 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- TldConfig.java23 Sep 2003 19:47:52 -  1.26
  +++ TldConfig.java23 Sep 2003 20:06:07 -  1.27
  @@ -724,16 +724,23 @@
   }
   
   /**
  - * Returns a map of the paths to all JAR files accessible to the webapp.
  + * Returns a map of the paths to all JAR files that are accessible to the
  + * webapp and will be scanned for TLDs.
*
  - * The map includes the JARs under WEB-INF/lib as well as those in the
  - * classloader delegation chain of the webapp's classloader.
  + * The map always includes all the JARs under WEB-INF/lib, as well as
  + * shared JARs in the classloader delegation chain of the webapp's
  + * classloader.
*
* The latter constitutes a Tomcat-specific extension to the TLD search
* order defined in the JSP spec. It allows tag libraries packaged as JAR
* files to be shared by web applications by simply dropping them in a 
* location that all web applications have access to (e.g.,
* CATALINA_HOME/common/lib).
  + *
  + * The set of shared JARs to be scanned for TLDs is narrowed down by
  + * the list of JARs specified as the value of the ttnoTldJars/tt
  + * property in catalina.properties, which are known not to contain any 
  + * TLDs.
*
* @return Map of JAR file paths
*/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-22 Thread luehe
luehe   2003/09/22 14:42:45

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Fixed javadocs for tldScanJar(File file)
  
  Revision  ChangesPath
  1.21  +2 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TldConfig.java2 Sep 2003 21:22:00 -   1.20
  +++ TldConfig.java22 Sep 2003 21:42:45 -  1.21
  @@ -496,8 +496,8 @@
   /**
* Scans all TLD entries in the given JAR for application listeners.
*
  - * @param conn URLConnection to the JAR file whose TLD entries are
  - * scanned for application listeners
  + * @param file JAR file whose TLD entries are scanned for application
  + * listeners
*/
   private void tldScanJar(File file) throws Exception {
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-22 Thread luehe
luehe   2003/09/22 15:25:20

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Avoid TLD-scanning the JARs under WEB-INF lib twice per webapp.
  
  When navigating the webapp classloader delegation chain in search for
  global JARs, we are also adding the JARs under WEB-INF lib,
  duplicating the functionality of tldScanResourcePathsWebInfLibJars(),
  which has become redundant and has been removed.
  
  Revision  ChangesPath
  1.22  +23 -56
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TldConfig.java22 Sep 2003 21:42:45 -  1.21
  +++ TldConfig.java22 Sep 2003 22:25:20 -  1.22
  @@ -249,11 +249,11 @@
* files, to be processed
*/
   Set resourcePaths = tldScanResourcePaths();
  -Map globalJarPaths = getGlobalJarPaths();
  +Map jarPaths = getJarPaths();
   
   // Check to see if we can use cached listeners
   if (tldCache != null  tldCache.exists()) {
  -long lastModified = getLastModified(resourcePaths, globalJarPaths);
  +long lastModified = getLastModified(resourcePaths, jarPaths);
   if (lastModified  tldCache.lastModified()) {
   processCache(tldCache);
   return;
  @@ -270,8 +270,8 @@
   tldScanTld(path);
   }
   }
  -if (globalJarPaths != null) {
  -paths = globalJarPaths.values().iterator();
  +if (jarPaths != null) {
  +paths = jarPaths.values().iterator();
   while (paths.hasNext()) {
   tldScanJar((File) paths.next());
   }
  @@ -310,11 +310,11 @@
* Returns the last modification date of the given sets of resources.
*
* @param resourcePaths
  - * @param globalJarPaths
  + * @param jarPaths
*
* @return Last modification date
*/
  -private long getLastModified(Set resourcePaths, Map globalJarPaths)
  +private long getLastModified(Set resourcePaths, Map jarPaths)
   throws Exception {
   
   long lastModified = 0;
  @@ -334,8 +334,8 @@
   }
   }
   
  -if (globalJarPaths != null) {
  -paths = globalJarPaths.values().iterator();
  +if (jarPaths != null) {
  +paths = jarPaths.values().iterator();
   while (paths.hasNext()) {
   File jarFile = (File) paths.next();
   long lastM = jarFile.lastModified();
  @@ -650,7 +650,6 @@
   DirContext resources = context.getResources();
   if (resources != null) {
   tldScanResourcePathsWebInf(resources, /WEB-INF, resourcePaths);
  -tldScanResourcePathsWebInfLibJars(resources, resourcePaths);
   }
   
   // Return the completed set
  @@ -705,55 +704,23 @@
   }
   }
   
  -/*
  - * Adds any JARs in the /WEB-INF/lib subdirectory of the web application
  - * to the given set of resource paths.
  - *
  - * @param resources The web application's resources
  - * @param resourcePaths The set of resource paths to add to
  - */
  -private void tldScanResourcePathsWebInfLibJars(DirContext resources,
  -   Set resourcePaths)
  -throws IOException {
  -
  -if (log.isTraceEnabled()) {
  -log.trace(  Scanning JARs in /WEB-INF/lib subdirectory);
  -}
  -
  -try {
  -NamingEnumeration items = resources.list(/WEB-INF/lib);
  -while (items.hasMoreElements()) {
  -NameClassPair item = (NameClassPair) items.nextElement();
  -String resourcePath = /WEB-INF/lib/ + item.getName();
  -if (!resourcePath.endsWith(.jar)) {
  -continue;
  -}
  -if (log.isTraceEnabled()) {
  -log.trace(   Adding path ' + resourcePath + ');
  -}
  -resourcePaths.add(resourcePath);
  -}
  -} catch (NamingException e) {
  -; // Silent catch: it's valid that no /WEB-INF/lib directory exists
  -}
  -}
  -
   /**
  - * Returns the paths to all JAR files accessible to all parent
  - * classloaders of the web application class loader.
  + * Returns a map of the paths to all JAR files accessible to the webapp.
  + *
  + * The map includes the JARs under WEB-INF/lib as well as those in the
  + * classloader delegation chain of the 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-09-22 Thread luehe
luehe   2003/09/22 16:56:11

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Do not let the parsing error of a single TLD disrupt the parsing of remaining TLDs 
in the JAR
  
  Revision  ChangesPath
  1.23  +10 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TldConfig.java22 Sep 2003 22:25:20 -  1.22
  +++ TldConfig.java22 Sep 2003 23:56:11 -  1.23
  @@ -503,7 +503,6 @@
   
   JarFile jarFile = null;
   String name = null;
  -InputSource inputSource = null;
   
   String jarPath = file.getAbsolutePath();
   
  @@ -522,21 +521,18 @@
   if (log.isTraceEnabled()) {
   log.trace(  Processing TLD at ' + name + ');
   }
  -inputSource = new InputSource(jarFile.getInputStream(entry));
  -tldScanStream(inputSource);
  -inputSource = null;
  -name = null;
  +try {
  +tldScanStream(new InputSource(jarFile.getInputStream(entry)));
  +} catch (Exception e) {
  +log.error(sm.getString(contextConfig.tldEntryException,
  +   name, jarPath, context.getPath()),
  +  e);
  +}
   }
   } catch (Exception e) {
  -if (name == null) {
  -log.error(sm.getString(contextConfig.tldJarException,
  -   jarPath, context.getPath()),
  -  e);
  -} else {
  -log.error(sm.getString(contextConfig.tldEntryException,
  -   name, jarPath, context.getPath()),
  -  e);
  -}
  +log.error(sm.getString(contextConfig.tldJarException,
  +   jarPath, context.getPath()),
  +  e);
   } finally {
   if (jarFile != null) {
   try {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-08-26 Thread remm
remm2003/08/26 00:17:44

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  - Wrap getCanonicalFile in a try/catch (bug 22691). If the classpath or a CL has 
dubious
entries, they will simply be ignored.
  
  Revision  ChangesPath
  1.18  +9 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- TldConfig.java22 Aug 2003 23:18:24 -  1.17
  +++ TldConfig.java26 Aug 2003 07:17:43 -  1.18
  @@ -229,9 +229,9 @@
   
   File tldCache=null;
   
  -if( context instanceof StandardContext ) {
  -File workDir=(File)
  -
((StandardContext)context).getServletContext().getAttribute(Globals.WORK_DIR_ATTR);
  +if (context instanceof StandardContext) {
  +File workDir= (File)
  +
((StandardContext)context).getServletContext().getAttribute(Globals.WORK_DIR_ATTR);
   tldCache=new File( workDir, tldCache.ser);
   }
   
  @@ -753,7 +753,7 @@
* @return Map of paths to all JAR files accessible to all parent class
* loaders of the web application class loader
*/
  -private Map getGlobalJarPaths() throws IOException {
  +private Map getGlobalJarPaths() {
   
   HashMap globalJarPaths = null;
   
  @@ -767,7 +767,11 @@
   // over file or the custom jndi handler, but a lot less
   // buggy overall
   File file = new File(urls[i].getFile());
  -file = file.getCanonicalFile();
  +try {
  +file = file.getCanonicalFile();
  +} catch (IOException e) {
  +// Ignore
  +}
   if (file.exists()) {
   String path = file.getAbsolutePath();
   if (path.endsWith(.jar)) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-08-22 Thread luehe
luehe   2003/08/22 16:18:24

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Minor optimization: Avoid scanning duplicate JARs for TLDs
  
  Revision  ChangesPath
  1.17  +33 -20
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TldConfig.java20 Aug 2003 08:35:43 -  1.16
  +++ TldConfig.java22 Aug 2003 23:18:24 -  1.17
  @@ -75,9 +75,11 @@
   import java.net.URL;
   import java.util.ArrayList;
   import java.util.Enumeration;
  +import java.util.Set;
   import java.util.HashSet;
  +import java.util.Map;
  +import java.util.HashMap;
   import java.util.Iterator;
  -import java.util.Set;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
   import javax.naming.NameClassPair;
  @@ -248,7 +250,7 @@
* files, to be processed
*/
   Set resourcePaths = tldScanResourcePaths();
  -Set globalJarPaths = getGlobalJarPaths();
  +Map globalJarPaths = getGlobalJarPaths();
   
   // Check to see if we can use cached listeners
   if (tldCache != null  tldCache.exists()) {
  @@ -269,9 +271,11 @@
   tldScanTld(path);
   }
   }
  -paths = globalJarPaths.iterator();
  -while (paths.hasNext()) {
  -tldScanJar((File) paths.next());
  +if (globalJarPaths != null) {
  +paths = globalJarPaths.values().iterator();
  +while (paths.hasNext()) {
  +tldScanJar((File) paths.next());
  +}
   }
   
   String list[] = getTldListeners();
  @@ -311,7 +315,7 @@
*
* @return Last modification date
*/
  -private long getLastModified(Set resourcePaths, Set globalJarPaths)
  +private long getLastModified(Set resourcePaths, Map globalJarPaths)
   throws Exception {
   
   long lastModified = 0;
  @@ -331,14 +335,16 @@
   }
   }
   
  -paths = globalJarPaths.iterator();
  -while (paths.hasNext()) {
  -File jarFile = (File) paths.next();
  -long lastM = jarFile.lastModified();
  -if (lastM  lastModified) lastModified = lastM;
  -if (log.isDebugEnabled()) {
  -log.debug(Last modified  + jarFile.getAbsolutePath()
  -  +   + lastM);
  +if (globalJarPaths != null) {
  +paths = globalJarPaths.values().iterator();
  +while (paths.hasNext()) {
  +File jarFile = (File) paths.next();
  +long lastM = jarFile.lastModified();
  +if (lastM  lastModified) lastModified = lastM;
  +if (log.isDebugEnabled()) {
  +log.debug(Last modified  + jarFile.getAbsolutePath()
  +  +   + lastM);
  +}
   }
   }
   
  @@ -744,12 +750,12 @@
* location that all web applications have access to (e.g.,
* CATALINA_HOME/common/lib).
*
  - * @return Set of paths to all JAR files accessible to all parent class
  + * @return Map of paths to all JAR files accessible to all parent class
* loaders of the web application class loader
*/
  -private Set getGlobalJarPaths() throws IOException {
  +private Map getGlobalJarPaths() throws IOException {
   
  -Set globalJarPaths = new HashSet();
  +HashMap globalJarPaths = null;
   
   ClassLoader loader = Thread.currentThread().getContextClassLoader();
   while (loader != null) {
  @@ -762,9 +768,16 @@
   // buggy overall
   File file = new File(urls[i].getFile());
   file = file.getCanonicalFile();
  -if ((file.exists()) 
  - (file.getAbsolutePath().endsWith(.jar))) {
  -globalJarPaths.add(file);
  +if (file.exists()) {
  +String path = file.getAbsolutePath();
  +if (path.endsWith(.jar)) {
  +if (globalJarPaths == null) {
  +globalJarPaths = new HashMap();
  +globalJarPaths.put(path, file);
  +} else if (!globalJarPaths.containsKey(path)) {
  +globalJarPaths.put(path, file);
  +}
  +}
   }
   }
   }
  
  
  


cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-08-14 Thread jfarcand
jfarcand2003/08/12 09:15:52

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Add support for Tld validation (also fix bug 21917: TldConfig.java does not set 
SystemId). Validation only works with Crimson right now.
  
  Revision  ChangesPath
  1.83  +3 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- StandardContext.java  10 Aug 2003 09:47:33 -  1.82
  +++ StandardContext.java  12 Aug 2003 16:15:52 -  1.83
  @@ -3956,6 +3956,8 @@
   // Read tldListeners. XXX Option to disable
   TldConfig tldConfig = new TldConfig();
   tldConfig.setContext(this);
  +tldConfig.setXmlValidation(((StandardHost) 
getParent()).getXmlValidation());
  +tldConfig.setXmlNamespaceAware(((StandardHost) 
getParent()).getXmlNamespaceAware());
   try {
   tldConfig.execute();
   } catch (Exception ex) {
  
  
  
  1.15  +52 -28
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TldConfig.java28 Jul 2003 22:57:41 -  1.14
  +++ TldConfig.java12 Aug 2003 16:15:52 -  1.15
  @@ -94,7 +94,7 @@
   import org.apache.commons.digester.Digester;
   import org.xml.sax.SAXNotRecognizedException;
   import org.xml.sax.SAXNotSupportedException;
  -
  +import org.xml.sax.InputSource;
   /**
* Startup event listener for a bContext/b that configures the properties
* of that Context, and the associated defined servlets.
  @@ -149,6 +149,44 @@
   
   // - Public Methods
   
  + /**
  + * Set the validation feature of the XML parser used when
  + * parsing xml instances.
  + * @param xmlValidation true to enable xml instance validation
  + */
  +public void setXmlValidation(boolean xmlValidation){
  +this.xmlValidation = xmlValidation;
  +}
  +
  +/**
  + * Get the server.xml host attribute's xmlValidation.
  + * @return true if validation is enabled.
  + *
  + */
  +public boolean getXmlValidation(){
  +return xmlValidation;
  +}
  +
  +/**
  + * Get the server.xml host attribute's xmlNamespaceAware.
  + * @return true if namespace awarenes is enabled.
  + *
  + */
  +public boolean getXmlNamespaceAware(){
  +return xmlNamespaceAware;
  +}
  +
  +
  +/**
  + * Set the namespace aware feature of the XML parser used when
  + * parsing xml instances.
  + * @param xmlNamespaceAware true to enable namespace awareness
  + */
  +public void setXmlNamespaceAware(boolean xmlNamespaceAware){
  +this.xmlNamespaceAware=xmlNamespaceAware;
  +}
  +
  +
   public boolean isRescan() {
   return rescan;
   }
  @@ -177,6 +215,7 @@
   return result;
   }
   
  +
   /**
* Scan for and configure all tag library descriptors found in this
* web application.
  @@ -458,7 +497,7 @@
   
   JarFile jarFile = null;
   String name = null;
  -InputStream inputStream = null;
  +InputSource inputSource = null;
   
   String jarPath = file.getAbsolutePath();
   
  @@ -477,10 +516,9 @@
   if (log.isTraceEnabled()) {
   log.trace(  Processing TLD at ' + name + ');
   }
  -inputStream = jarFile.getInputStream(entry);
  -tldScanStream(inputStream);
  -inputStream.close();
  -inputStream = null;
  +inputSource = new InputSource(jarFile.getInputStream(entry));
  +tldScanStream(inputSource);
  +inputSource = null;
   name = null;
   }
   } catch (Exception e) {
  @@ -494,13 +532,6 @@
 e);
   }
   } finally {
  -if (inputStream != null) {
  -try {
  -inputStream.close();
  -} catch (Throwable t) {
  -// Ignore
  -}
  -}
  

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-07-28 Thread luehe
luehe   2003/07/28 15:57:41

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  removed tabs
  
  Revision  ChangesPath
  1.14  +75 -80
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TldConfig.java25 Jul 2003 22:39:57 -  1.13
  +++ TldConfig.java28 Jul 2003 22:57:41 -  1.14
  @@ -205,13 +205,13 @@
   }
   
   /*
  -  * Acquire the list of TLD resource paths, possibly embedded in JAR
  -  * files, to be processed
  -  */
  + * Acquire the list of TLD resource paths, possibly embedded in JAR
  + * files, to be processed
  + */
   Set resourcePaths = tldScanResourcePaths();
  - Set globalJarPaths = getGlobalJarPaths();
  +Set globalJarPaths = getGlobalJarPaths();
   
  - // Check to see if we can use cached listeners
  +// Check to see if we can use cached listeners
   if (tldCache != null  tldCache.exists()) {
   long lastModified = getLastModified(resourcePaths, globalJarPaths);
   if (lastModified  tldCache.lastModified()) {
  @@ -275,35 +275,35 @@
   private long getLastModified(Set resourcePaths, Set globalJarPaths)
   throws Exception {
   
  - long lastModified = 0;
  +long lastModified = 0;
   
  - Iterator paths = resourcePaths.iterator();
  - while (paths.hasNext()) {
  - String path = (String) paths.next();
  - URL url = context.getServletContext().getResource(path);
  - if (url == null) {
  - log.debug( Null url + path );
  - break;
  - }
  - long lastM = url.openConnection().getLastModified();
  - if (lastM  lastModified) lastModified = lastM;
  - if (log.isDebugEnabled()) {
  - log.debug( Last modified  + path +   + lastM);
  - }
  - }
  -
  - paths = globalJarPaths.iterator();
  - while (paths.hasNext()) {
  - File jarFile = (File) paths.next();
  - long lastM = jarFile.lastModified();
  - if (lastM  lastModified) lastModified = lastM;
  - if (log.isDebugEnabled()) {
  - log.debug(Last modified  + jarFile.getAbsolutePath()
  -   +   + lastM);
  - }
  - }
  +Iterator paths = resourcePaths.iterator();
  +while (paths.hasNext()) {
  +String path = (String) paths.next();
  +URL url = context.getServletContext().getResource(path);
  +if (url == null) {
  +log.debug( Null url + path );
  +break;
  +}
  +long lastM = url.openConnection().getLastModified();
  +if (lastM  lastModified) lastModified = lastM;
  +if (log.isDebugEnabled()) {
  +log.debug( Last modified  + path +   + lastM);
  +}
  +}
   
  - return lastModified;
  +paths = globalJarPaths.iterator();
  +while (paths.hasNext()) {
  +File jarFile = (File) paths.next();
  +long lastM = jarFile.lastModified();
  +if (lastM  lastModified) lastModified = lastM;
  +if (log.isDebugEnabled()) {
  +log.debug(Last modified  + jarFile.getAbsolutePath()
  +  +   + lastM);
  +}
  +}
  +
  +return lastModified;
   }
   
   private void processCache(File tldCache ) throws IOException {
  @@ -322,6 +322,7 @@
   ex.printStackTrace();
   }
   }
  +
   /**
* Create (if necessary) and return a Digester configured to process a tag
* library descriptor, looking for additional listener classes to be
  @@ -379,7 +380,6 @@
   }
   return digester;
   }
  -
   
   /**
* Utilities used to force the parser to use local schema, when available,
  @@ -420,8 +420,6 @@
   return entityResolver;
   }
   
  -
  -
   /**
* Scan the JAR file at the specified resource path for TLDs in the
* codeMETA-INF/code subdirectory, and scan each TLD for application
  @@ -437,12 +435,12 @@
   log.debug( Scanning JAR at resource path ' + resourcePath + ');
   }
   
  - URL url = context.getServletContext().getResource(resourcePath);
  +URL url = context.getServletContext().getResource(resourcePath);
   if (url == null) {
  - throw new IllegalArgumentException
  - (sm.getString(contextConfig.tldResourcePath,
  -   resourcePath));
  - 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-07-25 Thread luehe
luehe   2003/07/25 15:39:57

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Consider TLDs in WEB-INF subdirectory *and its subdirectories* when
  searching for listeners.
  
  The code used to ignore any subdirs of the WEB-INF subdir, claiming
  that the JSP spec was not clear about.
  
  The JSP 2.0 spec is clear about it, see JSP.7.3.1:
  
When deployed directly into a web application, the tag library
descriptor files must always be in the WEB-INF directory, or some
subdirectory of it. TLD files should not be placed in /WEB-INF/classes
or /WEB-INF/lib.
  
  Revision  ChangesPath
  1.13  +28 -15
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TldConfig.java15 Jun 2003 07:41:12 -  1.12
  +++ TldConfig.java25 Jul 2003 22:39:57 -  1.13
  @@ -623,7 +623,7 @@
   
   DirContext resources = context.getResources();
if (resources != null) {
  - tldScanResourcePathsWebInf(resources, resourcePaths);
  + tldScanResourcePathsWebInf(resources, /WEB-INF, resourcePaths);
tldScanResourcePathsWebInfLibJars(resources, resourcePaths);
}
   
  @@ -633,33 +633,46 @@
   }
   
   /*
  - * Scans TLDs in the /WEB-INF subdirectory of the web application.
  + * Scans the web application's subdirectory identified by rootPath,
  + * along with its subdirectories, for TLDs.
  + *
  + * Initially, rootPath equals /WEB-INF. The /WEB-INF/classes and
  + * /WEB-INF/lib subdirectories are excluded from the search, as per the
  + * JSP 2.0 spec.
*
* @param resources The web application's resources
  - * @param resourcePaths The set of resource paths to add to
  + * @param rootPath The path whose subdirectories are to be searched for
  + * TLDs
  + * @param tldPaths The set of TLD resource paths to add to
*/
   private void tldScanResourcePathsWebInf(DirContext resources,
  - Set resourcePaths) 
  +String rootPath,
  + Set tldPaths) 
   throws IOException {
  -
  + 
   if (log.isTraceEnabled()) {
  -log.trace(  Scanning TLDs in /WEB-INF subdirectory);
  +log.trace(  Scanning TLDs in  + rootPath +  subdirectory);
   }
   
try {
  - NamingEnumeration items = resources.list(/WEB-INF);
  + NamingEnumeration items = resources.list(rootPath);
while (items.hasMoreElements()) {
NameClassPair item = (NameClassPair) items.nextElement();
  - String resourcePath = /WEB-INF/ + item.getName();
  - // FIXME - JSP 2.0 is not explicit about whether we should
  - // scan subdirectories of /WEB-INF for TLDs also
  - if (!resourcePath.endsWith(.tld)) {
  + String resourcePath = rootPath + / + item.getName();
  + if (!resourcePath.endsWith(.tld)
  + (resourcePath.startsWith(/WEB-INF/classes)
  +|| resourcePath.startsWith(/WEB-INF/lib))) {
continue;
}
  - if (log.isTraceEnabled()) {
  - log.trace(   Adding path ' + resourcePath + ');
  - }
  - resourcePaths.add(resourcePath);
  +if (resourcePath.endsWith(.tld)) {
  + if (log.isTraceEnabled()) {
  + log.trace(   Adding path ' + resourcePath + ');
  + }
  + tldPaths.add(resourcePath);
  +} else {
  +tldScanResourcePathsWebInf(resources, resourcePath,
  +   tldPaths);
  +}
}
} catch (NamingException e) {
; // Silent catch: it's valid that no /WEB-INF directory exists
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-06-12 Thread remm
remm2003/06/12 15:41:19

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  - Replace JAR URL code with regular JAR files (as the CL is forced to generate
JAR URLs).
  - Jasper apparently causes JAR locking.
  - Struts is locking iteslf up. My theory is that it is caused by loading up a DTD
for validation by the XML parser through a JAR URL without setting caches to false.
I'll investigate more.
  
  Revision  ChangesPath
  1.11  +39 -63
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TldConfig.java24 Apr 2003 19:35:49 -  1.10
  +++ TldConfig.java12 Jun 2003 22:41:19 -  1.11
  @@ -232,7 +232,7 @@
   }
   paths = globalJarPaths.iterator();
   while (paths.hasNext()) {
  -tldScanJar((JarURLConnection) paths.next());
  +tldScanJar((File) paths.next());
   }
   
   String list[] = getTldListeners();
  @@ -294,11 +294,11 @@
   
paths = globalJarPaths.iterator();
while (paths.hasNext()) {
  - JarURLConnection conn = (JarURLConnection) paths.next();
  - long lastM = conn.getLastModified();
  + File jarFile = (File) paths.next();
  + long lastM = jarFile.lastModified();
if (lastM  lastModified) lastModified = lastM;
if (log.isDebugEnabled()) {
  - log.debug(Last modified  + conn.getJarFileURL().toString()
  + log.debug(Last modified  + jarFile.getAbsolutePath()
  +   + lastM);
}
}
  @@ -438,33 +438,35 @@
   }
   
URL url = context.getServletContext().getResource(resourcePath);
  - if (url == null) {
  +if (url == null) {
throw new IllegalArgumentException
(sm.getString(contextConfig.tldResourcePath,
  resourcePath));
}
  - url = new URL(jar: + url.toString() + !/);
  - JarURLConnection conn = (JarURLConnection) url.openConnection();
  - conn.setUseCaches(false);
  - tldScanJar(conn);
  +
  +File file = new File(url.getFile());
  +file = file.getCanonicalFile();
  +tldScanJar(file);
  +
   }
   
  -/*
  +
  +/**
* Scans all TLD entries in the given JAR for application listeners.
*
* @param conn URLConnection to the JAR file whose TLD entries are
* scanned for application listeners
*/
  -private void tldScanJar(JarURLConnection conn) throws Exception {
  +private void tldScanJar(File file) throws Exception {
   
   JarFile jarFile = null;
   String name = null;
   InputStream inputStream = null;
   
  - String jarPath = conn.getJarFileURL().toString();
  + String jarPath = file.getAbsolutePath();
   
try {
  - jarFile = conn.getJarFile();
  + jarFile = new JarFile(file);
   Enumeration entries = jarFile.entries();
   while (entries.hasMoreElements()) {
   JarEntry entry = (JarEntry) entries.nextElement();
  @@ -512,6 +514,7 @@
   }
   }
   
  +
   /**
* Scan the TLD contents in the specified input stream, and register
* any application event listeners found there.  bNOTE/b - It is
  @@ -692,7 +695,8 @@
   }
   }
   
  -/*
  +
  +/**
* Returns the paths to all JAR files accessible to all parent
* classloaders of the web application class loader.
*
  @@ -703,60 +707,32 @@
* CATALINA_HOME/common/lib).
*
* @return Set of paths to all JAR files accessible to all parent class
  - * loaders of the web application class loader
  + * loaders of the web application class loader
*/
   private Set getGlobalJarPaths() throws IOException {
   
   Set globalJarPaths = new HashSet();
   
  - ClassLoader loader = Thread.currentThread().getContextClassLoader();
  - while (loader != null) {
  - if (loader instanceof URLClassLoader) {
  - URL[] urls = ((URLClassLoader) loader).getURLs();
  - for (int i=0; iurls.length; i++) {
  - JarURLConnection jarConn = null;
  - URLConnection conn = urls[i].openConnection();
  - if (conn instanceof JarURLConnection) {
  - jarConn = (JarURLConnection) conn;
  - } else {
  - String urlStr = urls[i].toString();
  - if (urlStr.startsWith(file:)
  -  

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-04-02 Thread luehe
luehe   2003/04/02 12:03:12

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  When searching parent class loaders for JAR files (for automatic TLD
  recognition), ignore any JAR files that don't exist
  
  Revision  ChangesPath
  1.5   +21 -11
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TldConfig.java28 Mar 2003 20:56:15 -  1.4
  +++ TldConfig.java2 Apr 2003 20:03:11 -   1.5
  @@ -489,14 +489,13 @@
   } catch (Exception e) {
   // XXX Why do we wrap it ? The signature is 'throws Exception'
   if (name == null) {
  -log.error(sm.getString(contextConfig.tldJarException,
  -jarPath, context.getPath()),
  -   e);
  + log.error(sm.getString(contextConfig.tldJarException,
  +jarPath, context.getPath()),
  +   e);
   } else {
  -log.error(sm.getString(contextConfig.tldEntryException,
  -name, jarPath,
  -context.getPath()),
  -   e);
  + log.error(sm.getString(contextConfig.tldEntryException,
  +name, jarPath, context.getPath()),
  +   e);
   }
   } finally {
   if (inputStream != null) {
  @@ -724,19 +723,30 @@
if (loader instanceof URLClassLoader) {
URL[] urls = ((URLClassLoader) loader).getURLs();
for (int i=0; iurls.length; i++) {
  + JarURLConnection jarConn = null;
URLConnection conn = urls[i].openConnection();
if (conn instanceof JarURLConnection) {
  - conn.setUseCaches(false);   
  - globalJarPaths.add((JarURLConnection) conn);
  + jarConn = (JarURLConnection) conn;
} else {
String urlStr = urls[i].toString();
if (urlStr.startsWith(file:)
 urlStr.endsWith(.jar)) {
URL jarURL = new URL(jar: + urlStr + !/);
  - JarURLConnection jarConn = (JarURLConnection)
  - jarURL.openConnection();
  + jarConn = (JarURLConnection) jarURL.openConnection();
  + }
  + }
  + if (jarConn != null) {
  + try {
  + /*
  +  * Call getJarFile() to see if JAR file exists
  +  * (throws exception in case it doesn't)
  +  */
  + jarConn.getJarFile();
jarConn.setUseCaches(false);
globalJarPaths.add(jarConn);
  + } catch (Exception e) {
  + // Ignore any JAR files that may have been
  + // specified on the class path but don't exist
}
}
}
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-03-28 Thread luehe
luehe   2003/03/28 12:56:16

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Changed timing of setUseCaches call on JarURLConnection, to prevent
  java.lang.IllegalStateException
  
  Revision  ChangesPath
  1.4   +8 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TldConfig.java26 Mar 2003 20:40:37 -  1.3
  +++ TldConfig.java28 Mar 2003 20:56:15 -  1.4
  @@ -444,7 +444,9 @@
  resourcePath));
}
url = new URL(jar: + url.toString() + !/);
  - tldScanJar((JarURLConnection) url.openConnection());
  + JarURLConnection conn = (JarURLConnection) url.openConnection();
  + conn.setUseCaches(false);
  + tldScanJar(conn);
   }
   
   /*
  @@ -462,7 +464,6 @@
String jarPath = conn.getJarFileURL().toString();
   
try {
  - conn.setUseCaches(false);
jarFile = conn.getJarFile();
   Enumeration entries = jarFile.entries();
   while (entries.hasMoreElements()) {
  @@ -725,14 +726,17 @@
for (int i=0; iurls.length; i++) {
URLConnection conn = urls[i].openConnection();
if (conn instanceof JarURLConnection) {
  + conn.setUseCaches(false);   
globalJarPaths.add((JarURLConnection) conn);
} else {
String urlStr = urls[i].toString();
if (urlStr.startsWith(file:)
 urlStr.endsWith(.jar)) {
URL jarURL = new URL(jar: + urlStr + !/);
  - globalJarPaths.add((JarURLConnection)
  -jarURL.openConnection());
  + JarURLConnection jarConn = (JarURLConnection)
  + jarURL.openConnection();
  + jarConn.setUseCaches(false);
  + globalJarPaths.add(jarConn);
}
}
}
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-03-26 Thread luehe
luehe   2003/03/26 12:40:37

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Fixed Bugzilla 15875 (Support global sharing of tag libraries)
  
  Revision  ChangesPath
  1.3   +186 -66   
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TldConfig.java16 Feb 2003 19:40:21 -  1.2
  +++ TldConfig.java26 Mar 2003 20:40:37 -  1.3
  @@ -69,6 +69,8 @@
   import java.io.InputStream;
   import java.io.ObjectInputStream;
   import java.io.ObjectOutputStream;
  +import java.net.URLConnection;
  +import java.net.URLClassLoader;
   import java.net.JarURLConnection;
   import java.net.URL;
   import java.util.ArrayList;
  @@ -106,6 +108,9 @@
   private static org.apache.commons.logging.Log log=
   org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
   
  +private static final String FILE_URL_PREFIX = file:;
  +private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
  +
   // - Instance Variables
   
   /**
  @@ -199,32 +204,23 @@
   }
   }
   
  -// Acquire this list of TLD resource paths to be processed
  +/*
  +  * Acquire the list of TLD resource paths, possibly embedded in JAR
  +  * files, to be processed
  +  */
   Set resourcePaths = tldScanResourcePaths();
  + Set globalJarPaths = getGlobalJarPaths();
   
  -if( tldCache!= null  tldCache.exists()) {
  -// Find last modified
  -Iterator paths = resourcePaths.iterator();
  -long lastModified=0;
  -while (paths.hasNext()) {
  -String path = (String) paths.next();
  -URL url = context.getServletContext().getResource(path);
  -if( url==null ) {
  -log.info( Null url + path );
  -break;
  -}
  -long lastM=url.openConnection().getLastModified();
  -if( lastM  lastModified ) lastModified=lastM;
  -if( log.isDebugEnabled() )
  -log.debug( Last modified  + path +   + lastM);
  -}
  -
  -if( lastModified  tldCache.lastModified()) {
  + // Check to see if we can use cached listeners
  +if (tldCache != null  tldCache.exists()) {
  +long lastModified = getLastModified(resourcePaths, globalJarPaths);
  +if (lastModified  tldCache.lastModified()) {
   processCache(tldCache);
   return;
   }
   }
  -// Scan each accumulated resource paths for TLDs to be processed
  +
  +// Scan each accumulated resource path for TLDs to be processed
   Iterator paths = resourcePaths.iterator();
   while (paths.hasNext()) {
   String path = (String) paths.next();
  @@ -234,7 +230,12 @@
   tldScanTld(path);
   }
   }
  -String list[]=getTldListeners();
  +paths = globalJarPaths.iterator();
  +while (paths.hasNext()) {
  +tldScanJar((JarURLConnection) paths.next());
  +}
  +
  +String list[] = getTldListeners();
   
   if( tldCache!= null ) {
   log.info( Saving tld cache:  + tldCache +   + list.length);
  @@ -263,6 +264,48 @@
   
   //  Private Methods
   
  +/*
  + * Returns the last modification date of the given sets of resources.
  + *
  + * @param resourcePaths
  + * @param globalJarPaths
  + *
  + * @return Last modification date
  + */
  +private long getLastModified(Set resourcePaths, Set globalJarPaths)
  +throws Exception {
  +
  + long lastModified = 0;
  +
  + Iterator paths = resourcePaths.iterator();
  + while (paths.hasNext()) {
  + String path = (String) paths.next();
  + URL url = context.getServletContext().getResource(path);
  + if (url == null) {
  + log.info( Null url + path );
  + break;
  + }
  + long lastM = url.openConnection().getLastModified();
  + if (lastM  lastModified) lastModified = lastM;
  + if (log.isDebugEnabled()) {
  + log.debug( Last modified  + path +   + lastM);
  + }
  + }
  +
  + paths = globalJarPaths.iterator();
  + while (paths.hasNext()) {
  + JarURLConnection conn = (JarURLConnection) paths.next();
  + long lastM = conn.getLastModified();
  +  

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-01-24 Thread costin
costin  2003/01/24 11:28:10

  Added:   catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  Refactored the tld listener configuration out of ContextConfig.
  
  Cache the listeners in work/.../tldCache.ser ( as a String[] ). If the
  file exists and is newer than all .jar and .tld - we'll not rescan/re-parse
  those.
  
  This needs to be called from Context ( right before START event ), and removed
  from ContextConfig.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  /*
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.startup;
  
  
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.ObjectInputStream;
  import java.io.ObjectOutputStream;
  import java.net.JarURLConnection;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Enumeration;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.util.Set;
  import java.util.jar.JarEntry;
  import java.util.jar.JarFile;
  import javax.naming.NameClassPair;
  import javax.naming.NamingEnumeration;
  import javax.naming.NamingException;
  import javax.naming.directory.DirContext;
  import javax.servlet.ServletException;
  import javax.xml.parsers.ParserConfigurationException;
  import org.apache.catalina.Context;
  import org.apache.catalina.Globals;
  import org.apache.catalina.core.StandardContext;
  import org.apache.catalina.util.SchemaResolver;
  import org.apache.catalina.util.StringManager;
  import org.apache.commons.digester.Digester;
  import org.xml.sax.SAXNotRecognizedException;
  import org.xml.sax.SAXNotSupportedException;
  
  /**
   * Startup event listener for a bContext/b that configures the properties
   * of that Context, and the associated defined servlets.
   *
   * @author Craig R. McClanahan
   * @author Jean-Francois Arcand
   * @author Costin Manolache
   */
  public final class TldConfig