tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators Jdk12Interceptor.java
Date Thu, 27 Jun 2002 04:20:52 GMT
billbarker    2002/06/26 21:20:52

  Modified:    src/share/org/apache/tomcat/modules/generators
                        Jdk12Interceptor.java
  Log:
  Make certain the the Context Classloader is set when a servlet is loaded.
  
  With this, you can load classes that depend of the Context Classloader in the constructor
or static class initializer.
  
  Fix for bug #7654
  Reported By: Maxim Golubitsky maxim@tradertools.com
  
  Revision  Changes    Path
  1.7       +13 -0     jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/Jdk12Interceptor.java
  
  Index: Jdk12Interceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/Jdk12Interceptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Jdk12Interceptor.java	19 Jul 2001 21:45:52 -0000	1.6
  +++ Jdk12Interceptor.java	27 Jun 2002 04:20:52 -0000	1.7
  @@ -82,6 +82,13 @@
   	fixJDKContextClassLoader(ctx);
       }
   
  +    public int preInitCheck( Request req, Handler sw )
  +	throws TomcatException
  +    {
  +	fixJDKContextClassLoader(ctx);
  +	return 0;
  +    }
  +
       /** Servlet Destroy  notification
        */
       public void preServletDestroy( Context ctx, Handler sw )
  @@ -102,6 +109,12 @@
   	jdk11Compat.setContextClassLoader(this.getClass().getClassLoader());
       }
       
  +    public int postInitCheck( Request req, Handler sw )
  +	throws TomcatException
  +    {
  +	jdk11Compat.setContextClassLoader(this.getClass().getClassLoader());
  +	return 0;
  +    }
       /** Called before service method is invoked. 
        */
       public int preService(Request request, Response response) {
  
  
  

--
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