On Fri, 10 Aug 2001, Larry Isaacs wrote:

> Because of the way Tomcat 3.2.x sets up its classloader
> hierarchy, you are stuck.  I'm not aware of any tricks
> to allow your library to remain in /WEB-INF/lib and
> xerces and xalan to remain in the "application" classloader.
> However, this issue is addressed in Tomcat 3.3 and
> Tomcat 4.0.
> 
> In Tomcat 3.3, a more complex classloader hierarchy is
> built which separates the server classes (which includes
> the server's XML parser) from the web application's classes.
> Now web applications can have their own XML parser.
> 

One "heads up" related to this for both 3.3 and 4.0 is important.  In 3.2,
Tomcat exposed an XML parser to all webapps, so that they didn't have to
provide one of their own.  This is *not* true for 3.3 or 4.0 -- you have
to either put one in the global library directory ($TOMCAT_HOME/lib) or
include the parser in /WEB-INF/lib of your web app.

> In Tomcat 4.0, per the servlet 2.3 spec, classloaders
> try to load the class first before delagating to their
> parent.  Thus, an XML parser in /WEB-INF/lib would
> "override" an XMP parser in a parent classloader.
> There is probably more to this story for Tomcat 4.0, but
> I will let someone with more experience than me
> elaborate.
> 

Nah, you got it just right, other than "XMP" instead of "XML" :-).

> Cheers,
> Larry
> 

Craig

Reply via email to