tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java
Date Mon, 09 Oct 2000 21:04:06 GMT
craigmcc    00/10/09 14:04:05

  Modified:    catalina/src/share/org/apache/catalina/loader
                        StandardClassLoader.java
               catalina/src/share/org/apache/catalina/resources
                        ResourcesBase.java
               catalina/src/share/org/apache/catalina/startup
                        ContextConfig.java
  Log:
  Work around a behavior change in the java.net.URLClassLoader
  implementation in JDK 1.3.0 for Windows.  If you specify a repository URL
  like this:
  
  	file:C:\Jakarta\build\tomcat-4.0\.\webapps\scarab\WEB-INF\classes/
  
  this repository would get silently ignored (even though JDK 1.2.2 was able
  to use it just fine).  This kind of thing happened when you started Tomcat
  4.0 without setting the CATALINA_HOME environment variable.
  
  Now, Tomcat 4.0 parses out the "\.\" occurrence, and Scarab can be started
  successfully (which was previously failing).
  
  If you want to run Tomcat 4.0 under Windows JDK 1.3.0 in the mean time, be
  sure you set the CATALINA_HOME variable to point at the top-level
  directory of the Tomcat 4.0 install for your system.
  
  Revision  Changes    Path
  1.5       +5 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StandardClassLoader.java	2000/09/30 19:15:46	1.4
  +++ StandardClassLoader.java	2000/10/09 21:04:02	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.4 2000/09/30 19:15:46 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/09/30 19:15:46 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.5 2000/10/09 21:04:02 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/10/09 21:04:02 $
    *
    * ====================================================================
    *
  @@ -99,7 +99,7 @@
    * independently.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2000/09/30 19:15:46 $
  + * @version $Revision: 1.5 $ $Date: 2000/10/09 21:04:02 $
    */
   
   public class StandardClassLoader
  @@ -1264,3 +1264,4 @@
   
   
   }
  +
  
  
  
  1.2       +5 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources/ResourcesBase.java
  
  Index: ResourcesBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources/ResourcesBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourcesBase.java	2000/08/11 22:45:58	1.1
  +++ ResourcesBase.java	2000/10/09 21:04:03	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources/ResourcesBase.java,v
1.1 2000/08/11 22:45:58 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/11 22:45:58 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/resources/ResourcesBase.java,v
1.2 2000/10/09 21:04:03 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/10/09 21:04:03 $
    *
    * ====================================================================
    *
  @@ -101,7 +101,7 @@
    * (such as a local or remote JAR file).
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/11 22:45:58 $
  + * @version $Revision: 1.2 $ $Date: 2000/10/09 21:04:03 $
    */
   
   public abstract class ResourcesBase
  @@ -1132,3 +1132,4 @@
   
   
   }
  +
  
  
  
  1.22      +16 -6     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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ContextConfig.java	2000/10/07 18:14:56	1.21
  +++ ContextConfig.java	2000/10/09 21:04:04	1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
1.21 2000/10/07 18:14:56 craigmcc Exp $
  - * $Revision: 1.21 $
  - * $Date: 2000/10/07 18:14:56 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
1.22 2000/10/09 21:04:04 craigmcc Exp $
  + * $Revision: 1.22 $
  + * $Date: 2000/10/09 21:04:04 $
    *
    * ====================================================================
    *
  @@ -124,7 +124,7 @@
    * of that Context, and the associated defined servlets.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.21 $ $Date: 2000/10/07 18:14:56 $
  + * @version $Revision: 1.22 $ $Date: 2000/10/09 21:04:04 $
    */
   
   public final class ContextConfig
  @@ -811,8 +811,18 @@
           } catch (MalformedURLException e) {
   	    ;
   	}
  -        if (classesURL != null)
  -            loader.addRepository(classesURL.toString() + "/");
  +        if (classesURL != null) {
  +            // Work around JDK 1.3 problem on Windows
  +            String classesURLString = classesURL.toString();
  +            while (true) {
  +                int index = classesURLString.indexOf("\\.\\");
  +                if (index < 0)
  +                    break;
  +                classesURLString = classesURLString.substring(0, index) +
  +                    '\\' + classesURLString.substring(index + 3);
  +            }
  +            loader.addRepository(classesURLString + "/");
  +        }
   
   	// Add the WEB-INF/lib/*.jar files
   	URL libURL = null;
  
  
  

Mime
View raw message