tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Tomcat Class Loader (parent/child tree)
Date Tue, 17 Jun 2003 13:54:49 GMT

It's only contradictory in appearance when you don't quote (or read) the
whole page ;)  

>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

But the next sentence, in the same paragraph, says:
"The model for web application class loaders differs slightly from this,
as discussed below, but the main principles are the same."

And below, after precise definitions of each classloader, it says:

"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 repositories first,
instead of delegating before looking. All other class loaders in Tomcat
4 follow the usual delegation pattern."

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: []
>Sent: Tuesday, June 17, 2003 9:50 AM
>Subject: Tomcat Class Loader (parent/child tree)
>>>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??
>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:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message