tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Luby <>
Subject Re: servlet.jar, /ext, MANIFEST.MF
Date Mon, 01 Apr 2002 00:18:46 GMT

I just committed the changes to the jakarta-tomcat-4.0 HEAD branch. Can 
you give it a try?

With these changes, Tomcat should load its own bundled jar and class 
files before any of the jar files in the JDK's installed extensions are 

I tested this by putting servlet.jar in my JDK's jre/lib/ext directory 
and then inserted a broken version of the javax.servlet.http.HttpServlet 
  class (my broken version extended Object and had no methods) into the 
jar so that if the servlet.jar in the JDK's jre/lib/ext directory is 
used, Tomcat will throw tons of exceptions.

Let me know if you find any problems with my changes.



Christopher K. St. John wrote:

> Patrick Luby wrote:
>>I can't help but think that there might be a way to point Tomcat
>>to its bundled jars without losing access to any non-conflicting
>  That would be better. (but the servletapi still should have
> the appropriate version info :-)
>>... have the class loaders in add the jars in
>>the JVM's jre/lib/ext directory to the end of its search list. 
>  Hmm. To match the spec, I think there would need to be a new
> classloader on top of all of those. Something like:
>    ExtClassLoader (pithed)
>        |
>    AppClassLoader (as normal)
>        |
>   Catalina /ext   (new: loads /ext classes)
>        |
>     Common        (as normal)
>       ...
>  Which means that stuff loaded from the classpath won't have
> access to extensions, so that's still not quite right. Since
> Tomcat closely controls what's on the classpath I'm not sure
> how much of an issues that is, but it's definitely a bit
> different than normal.
>  I'd settle for just having Tomcat print an error message if
> there was a conflict, but if the classloader hacks can be
> made to work that would obviously be better.

Patrick Luby                     Email:
Sun Microsystems                         Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message