craigmcc    00/10/30 13:43:53

  Modified:    catalina/src/share/org/apache/catalina/startup
                        ContextConfig.java
  Log:
  Scan all TLDs underneath the META-INF directory in a JAR file, per the
  requirements of JSP 1.2 PFD.
  
  Revision  Changes    Path
  1.30      +22 -11    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- ContextConfig.java        2000/10/30 18:00:25     1.29
  +++ ContextConfig.java        2000/10/30 21:43:52     1.30
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.29 2000/10/30 18:00:25 craigmcc Exp $
  - * $Revision: 1.29 $
  - * $Date: 2000/10/30 18:00:25 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.30 2000/10/30 21:43:52 craigmcc Exp $
  + * $Revision: 1.30 $
  + * $Date: 2000/10/30 21:43:52 $
    *
    * ====================================================================
    *
  @@ -117,7 +117,7 @@
    * of that Context, and the associated defined servlets.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.29 $ $Date: 2000/10/30 18:00:25 $
  + * @version $Revision: 1.30 $ $Date: 2000/10/30 21:43:52 $
    */
   
   public final class ContextConfig
  @@ -1005,13 +1005,24 @@
               JarURLConnection conn =
                   (JarURLConnection) url.openConnection();
               jarFile = conn.getJarFile();
  -            JarEntry jarEntry = jarFile.getJarEntry("META-INF/taglib.tld");
  -            if (jarEntry == null)
  -                return (false);
  -            stream = jarFile.getInputStream(jarEntry);
  -            mapper.readXml(stream, context);
  -            stream.close();
  -            return (true);
  +            boolean found = false;
  +            Enumeration entries = jarFile.entries();
  +            while (entries.hasMoreElements()) {
  +                JarEntry entry = (JarEntry) entries.nextElement();
  +                String name = entry.getName();
  +                if (!name.startsWith("META-INF/"))
  +                    continue;
  +                if (!name.endsWith(".tld"))
  +                    continue;
  +                if (debug >= 2)
  +                    log("    tldConfigJar(" + resourcePath +
  +                        "): Processing entry '" + name + "'");
  +                stream = jarFile.getInputStream(entry);
  +                mapper.readXml(stream, context);
  +                stream.close();
  +                found = true;
  +            }
  +            return (found);
           } catch (Exception e) {
               if (debug >= 2)
                   log("    tldConfigJar(" + resourcePath + "): " + e);
  
  
  

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

Reply via email to