tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/context LoaderInterceptor.java LoaderInterceptor1.java
Date Thu, 17 Aug 2000 16:52:30 GMT
costin      00/08/17 09:52:28

  Modified:    src/share/org/apache/tomcat/context LoaderInterceptor.java
                        LoaderInterceptor1.java
  Log:
  Added parent class loader to the servlet loader.
  
  Revision  Changes    Path
  1.4       +6 -0      jakarta-tomcat/src/share/org/apache/tomcat/context/LoaderInterceptor.java
  
  Index: LoaderInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/LoaderInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LoaderInterceptor.java	2000/07/27 18:47:28	1.3
  +++ LoaderInterceptor.java	2000/08/17 16:52:26	1.4
  @@ -120,6 +120,8 @@
   	    } catch( MalformedURLException ex ) {
   	    }
   	}
  +
  +	// Add servlet.jar and jasper.jar
       }
       
       public void contextInit( Context context)
  @@ -130,6 +132,10 @@
   	
   	AdaptiveServletLoader loader=new AdaptiveServletLoader();
   	context.setServletLoader( loader );
  +
  +	// XXX Customize this - based on context prefs,
  +	// select the right parent - it may be CM.getParentLoader()
  +	loader.setParentLoader( this.getClass().getClassLoader());
   
   	URL classP[]=context.getClassPath();
   	for(int i=0; i<classP.length; i++ ) {
  
  
  
  1.5       +11 -2     jakarta-tomcat/src/share/org/apache/tomcat/context/LoaderInterceptor1.java
  
  Index: LoaderInterceptor1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/LoaderInterceptor1.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LoaderInterceptor1.java	2000/08/14 18:40:29	1.4
  +++ LoaderInterceptor1.java	2000/08/17 16:52:26	1.5
  @@ -144,7 +144,12 @@
   	    dm=new DependManager();
   	    context.setDependManager( dm );
   	}
  -	URLClassLoader urlLoader=URLClassLoader.newInstance( urls );
  +
  +	// XXX Customize this - based on context prefs,
  +	// select the right parent - it may be CM.getParentLoader()
  +	ClassLoader parent=this.getClass().getClassLoader();
  +
  +	URLClassLoader urlLoader=URLClassLoader.newInstance( urls, parent );
   	DependClassLoader dcl=new DependClassLoader( dm, urlLoader);
   
   	context.setClassLoader( dcl );
  @@ -158,8 +163,12 @@
   
   	DependManager dm=new DependManager();
   	context.setDependManager( dm );
  +
  +	// XXX Customize this - based on context prefs,
  +	// select the right parent - it may be CM.getParentLoader()
  +	ClassLoader parent=this.getClass().getClassLoader();
   
  -	URLClassLoader urlLoader=URLClassLoader.newInstance( urls );
  +	URLClassLoader urlLoader=URLClassLoader.newInstance( urls , parent);
   	DependClassLoader dcl=new DependClassLoader( dm, urlLoader);
   	
   	context.setClassLoader( dcl );
  
  
  

Mime
View raw message