tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java catalina.properties
Date Tue, 23 Sep 2003 19:47:52 GMT
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  Changes    Path
  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.java	23 Sep 2003 18:48:36 -0000	1.25
  +++ TldConfig.java	23 Sep 2003 19:47:52 -0000	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 -0000	1.2
  +++ catalina.properties	23 Sep 2003 19:47:52 -0000	1.3
  @@ -53,3 +53,8 @@
   #                  repositories
   #     "foo/bar.jar": Add bar.jar as a class repository 
   shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/lib/*.jar
  +
  +#
  +# List of comma-separated names of JAR files that are known not to contain
  +# any TLDs
  +noTldJars=ant.jar,catalina.jar,catalina-ant.jar,catalina-cluster.jar,catalina-optional.jar,catalina-i18n-fr.jar,catalina-i18n-ja.jar,catalina-i18n-es.jar,commons-dbcp.jar,commons-modeler.jar,commons-logging-api.jar,commons-beanutils.jar,commons-fileupload-1.0.jar,commons-pool.jar,commons-digester.jar,commons-logging.jar,commons-collections.jar,commons-el.jar,jakarta-regexp-1.2.jar,jasper-compiler.jar,jasper-runtime.jar,jmx.jar,jmx-tools.jar,jsp-api.jar,jkshm.jar,jkconfig.jar,naming-common.jar,naming-resources.jar,naming-factory.jar,naming-java.jar,servlet-api.jar,servlets-default.jar,servlets-invoker.jar,servlets-common.jar,servlets-webdav.jar,tomcat-util.jar,tomcat-http11.jar,tomcat-jni.jar,tomcat-jk.jar,tomcat-jk2.jar,tomcat-coyote.jar,xercesImpl.jar,xmlParserAPIs.jar,sunjce_provider.jar,ldapsec.jar,localedata.jar,dnsns.jar
  
  
  

Mime
View raw message