Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 93631 invoked by uid 500); 13 Feb 2001 01:25:02 -0000 Delivered-To: apmail-jakarta-tomcat-4.0-cvs@apache.org Received: (qmail 93568 invoked by uid 1135); 13 Feb 2001 01:25:00 -0000 Date: 13 Feb 2001 01:25:00 -0000 Message-ID: <20010213012500.93565.qmail@apache.org> From: remm@apache.org To: jakarta-tomcat-4.0-cvs@apache.org Subject: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java remm 01/02/12 17:24:59 Modified: catalina/src/share/org/apache/catalina/core StandardContext.java Log: - Fix for an initialization problem, where listeners and filters couldn't be loaded if either : - They were inside a JAR file - They were in the /WEB-INF/classes repository and a JAR file was present in the /WEB_INF/lib path (that case is caused by a strange behavior of the URLClassLoader) Now, the bindings are set before the initialization of the listeners and the filters, so that the URLClassLoader can corretly access the contents of JARs. Revision Changes Path 1.39 +7 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- StandardContext.java 2001/01/25 19:09:17 1.38 +++ StandardContext.java 2001/02/13 01:24:56 1.39 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.38 2001/01/25 19:09:17 remm Exp $ - * $Revision: 1.38 $ - * $Date: 2001/01/25 19:09:17 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.39 2001/02/13 01:24:56 remm Exp $ + * $Revision: 1.39 $ + * $Date: 2001/02/13 01:24:56 $ * * ==================================================================== * @@ -138,7 +138,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.38 $ $Date: 2001/01/25 19:09:17 $ + * @version $Revision: 1.39 $ $Date: 2001/02/13 01:24:56 $ */ public class StandardContext @@ -2981,6 +2981,8 @@ getServletContext().setAttribute (Globals.RESOURCES_ATTR, getResources()); + DirContextURLStreamHandler.bind(getResources()); + // Configure and call application event listeners and filters listenerStart(); filterStart(); @@ -3021,7 +3023,6 @@ } // Load the collected "load on startup" servlets - DirContextURLStreamHandler.bind(getResources()); if (debug >= 1) log("Loading " + map.size() + " load-on-startup servlets"); Iterator keys = map.keySet().iterator(); @@ -3039,6 +3040,7 @@ } } } + DirContextURLStreamHandler.unbind(); if (debug >= 1)