On Mon, 12 Mar 2001, Christopher Farley wrote:
> Scott Walter ([EMAIL PROTECTED]) wrote:
>
> > I just deleted the jaxp.jar and the parser.jar from
> > the tomcat\lib directory and replaced with the
> > xerces/xalan jars and it worked like a champ,
>
> Is this *really* the desired solution? Doesn't this completely break the
> portability of .war servlet applications? The promise of .war was
> supposed to be that you could just drop the file in your servlet engine
> and have it work.
>
> As it turns out, if you use XML and need Xalan or Xerces, you need to
> alter Tomcat's configuration.
>
> Shouldn't the servlet's /WEB-INF/lib directory take precedence over the
> server's libs?
>
This is a notoriously tricky area to get right. Current nightly builds of
Tomcat 4.0 act the way you are suggesting, so that you can (for
example) install Xerces in WEB-INF/lib and ignore the fact that Tomcat
itself might be using Crimson. (4.0-b1 suffers from a "package sealing
violation" problem in this regard, because the Crimson JAR files are
sealed -- fixed in recent nightly builds).
However, the 2.2 spec is silent about this, so Tomcat 3.2 is within its
rights to follow the standard Java delegation model and ignore classes
under WEB-INF/lib if the same class is found on the system class
path. The fact that Tomcat 3.2 exposes the parser it is using to web apps
at all is a design flaw that has been addressed in subsequent major revs.
> --
> Christopher Farley
> www.northernbrewer.com
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]