Christopher, 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 loaded. 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. Thanks, Patrick 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 >>extensions. >> > > > That would be better. (but the servletapi still should have > the appropriate version info :-) > > > >>... have the class loaders in Bootstrap.java 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: [EMAIL PROTECTED] Sun Microsystems Phone: 408-276-7471 901 San Antonio Road, USCA14-303 Palo Alto, CA 94303-4900 ________________________________________________________________ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>