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 Wed, 28 Aug 2002 10:05:05 GMT
remm        2002/08/28 03:05:05

  Modified:    catalina/src/share/org/apache/catalina/loader
                        WebappClassLoader.java
  Log:
  - Fix bug where external repositories were not used.
    Patch submitted by David Oxley <dave at staffplanner.co.uk>
  - getURL returned invalid URLs. Unfortunately, fixing this will break the security
    manager under Windows using the default policy file. The workaround is easy,
    as the entries should be modified from:
     grant codeBase "file:${catalina.home}/server/webapps/admin/WEB-INF/lib/struts.jar"
    to
     grant codeBase  "file:/${catalina.home}/server/webapps/admin/WEB-INF/lib/struts.jar"
    (note the extra '/')
  - It will be mentioned in the release notes.
  
  Revision  Changes    Path
  1.46      +11 -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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- WebappClassLoader.java	9 Aug 2002 10:01:48 -0000	1.45
  +++ WebappClassLoader.java	28 Aug 2002 10:05:05 -0000	1.46
  @@ -951,6 +951,10 @@
                   log("      findClassInternal(" + name + ")");
               try {
                   clazz = findClassInternal(name);
  +            } catch(ClassNotFoundException cnfe) {
  +                if (!hasExternalRepositories) {
  +                    throw cnfe;
  +                }
               } catch(AccessControlException ace) {
                   ace.printStackTrace();
                   throw new ClassNotFoundException(name);
  @@ -2040,7 +2044,9 @@
           } catch (IOException e) {
               // Ignore
           }
  -        return new URL("file:" + realFile.getPath());
  +
  +        //return new URL("file:" + realFile.getPath());
  +        return realFile.toURL();
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message