tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java
Date Mon, 24 Sep 2001 22:09:29 GMT
remm        01/09/24 15:09:29

  Modified:    catalina/src/share/org/apache/catalina/loader
                        WebappClassLoader.java
  Log:
  - The validate check was too strict, at least with packages from the sevlet API,
    as it refused loading the JSPTL JAR (which uses package javax.servlet.jsptl).
    Bug reported by Justyna Horwat.
  
  Revision  Changes    Path
  1.17      +18 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- WebappClassLoader.java	2001/09/19 23:15:43	1.16
  +++ WebappClassLoader.java	2001/09/24 22:09:29	1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
1.16 2001/09/19 23:15:43 remm Exp $
  - * $Revision: 1.16 $
  - * $Date: 2001/09/19 23:15:43 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
1.17 2001/09/24 22:09:29 remm Exp $
  + * $Revision: 1.17 $
  + * $Date: 2001/09/24 22:09:29 $
    *
    * ====================================================================
    *
  @@ -123,7 +123,7 @@
    *
    * @author Remy Maucherat
    * @author Craig R. McClanahan
  - * @version $Revision: 1.16 $ $Date: 2001/09/19 23:15:43 $
  + * @version $Revision: 1.17 $ $Date: 2001/09/24 22:09:29 $
    */
   public class WebappClassLoader
       extends URLClassLoader
  @@ -1756,7 +1756,20 @@
               return false;
           if (name.startsWith("java."))
               return false;
  -        if (name.startsWith("javax.servlet."))
  +
  +        // Looking up the package
  +        String packageName = null;
  +        int pos = name.lastIndexOf('.');
  +        if (pos != -1)
  +            packageName = name.substring(0, pos);
  +
  +        if (packageName.equals("javax.servlet"))
  +            return false;
  +        if (packageName.equals("javax.servlet.http"))
  +            return false;
  +        if (packageName.equals("javax.servlet.jsp"))
  +            return false;
  +        if (packageName.equals("javax.servlet.jsp.tagext"))
               return false;
   
           return true;
  
  
  

Mime
View raw message