tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guus Holshuijsen" <>
Subject Re: Tomcat Class Loader (parent/child tree)
Date Tue, 17 Jun 2003 14:47:56 GMT

The tomcat documentation also mentions:
"As mentioned above, the web application class loader diverges from the
default Java 2 delegation model (in accordance with the recommendations in
the Servlet Specification, version 2.3, section 9.6). When a request to load
a class from the web application's WebappX class loader is processed, this
class loader will look in the local repostories FIRST, instead of delegating
before looking. All other class loaders in Tomcat 4 follow the usual
delegation pattern."

Therefor I don't think there is any contradiction. The Class loader HOWTO is
pretty interesting to read especially when all sections are read. I had to
spend several days on a class loading problem and asked for help before
somebody pointed me at this howto and adviced me to read it. ;-)

----- Original Message -----
From: <>
To: <>
Sent: Tuesday, June 17, 2003 3:50 PM
Subject: Tomcat Class Loader (parent/child tree)

> Hello,
> According to the tomcat documentation:
> "Normally, when a class loader is asked to load a particular
> class or resource, it delegates the request to a parent class
> loader first, and then looks in its own repositories only if
> the parent class loader(s) cannot find the requested class or
> resource."
> >From what I understand from the documentation, the common/lib
> directory is a parent to the webapp1/lib directory and therefore
> according to the preceding quote, Tomcat should look first in
> common/lib and THEN in webapp1/lib.
> I tried putting two identically-named classes in the common/lib
> directory and in the webapp1/lib.  My jsp uses the class loaded
> from webapp1/lib and not the class loaded from common/lib.  Is
> this not contradictory??
> Julien.
> -----
> Sent using ( http://MailStart.Com/welcome.html )
> The FREE way to access your mailbox via any web browser, anywhere!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message