tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brouwer <>
Subject Re: WEB-INF/lib and .jar files in Tomcat 3.1
Date Thu, 01 Jun 2000 16:19:17 GMT
Hi all,

"Craig R. McClanahan" wrote:
> <snipped some stuff>
> As currently implemented, the class loader used by Tomcat looks on the system
> classpath first, and then into the application-specific stuff (WEB-INF/classes
> and WEB-INF/lib/*.jar).  Thus, the classes from the JDK are going to be found
> where they have the same name, but the ones from your library will be found
> when they are different -- a mix that probably isn't going to work.
> IMHO the class loader logic should be reversed - load from the application
> repositories first and then the system classpath.  I'm cross posting this to
> the developer's list in order to discuss this further.

I while ago I brought this subject up with Danny Coward (spec lead of
Servlet 2.3) and he mentioned this will be clarified for 2.3. I also had
a discussion about the order of the classpath.

I think it should be:

WEB-INF/classes - WEB-INF/lib/*.jar - system classpath

My reasoning (from my mail to Danny)

> Let us imagine a J2EE container with the mail.jar version 1.1.0 on its
> system classpath. You are using mail.jar version 1.1.5 in your
> WEB-INF/lib/ because that version has some bugfixes. The only way to get
> your application working now is by modifying the J2EE container, a big
> problem if your web application is hosted by an ASP. The same is
> applicable for standard XML parsers that most servlet containers will
> use.

We will see with the next spec :-)
Mark Brouwer
Virgil B.V.

View raw message