tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Rudnicki <>
Subject Re: Jaxp and Classpath modification????
Date Tue, 05 Dec 2000 04:14:43 GMT

----- Original Message -----

> I see that Tomcat 3.2b8 at startup is including the JAXP XML parser jar
> files from the $TOMCAT_HOME/lib directory in my CLASSPATH.  That will NOT
> work for me - I'm trying to use the Xerces XML parser in a servlet and the
> JAXP DOM1 implementation is overriding the Xerces implementation.  Can I
> change that?  I tried moving the parser.jar, and jaxp.jar out of that
> directory but when I try and start tomcat I get the following errors:

I have to do this also and believe it is possible--heres how:

Ostensibly the DOM2 interfaces are compatible with DOM1 interfaces.

If this is true, the source of our problems (evil) is that parser.xml
includes the DOM1 interfaces (org.w3c.dom package).  I have solved this
problem in VAJ, which does not allow classpath stunts, by removing the w3c
packages from all xml distributions.  For tomcat, that means unpack
parser.jar and remove ALL the org.* packages.  Then repack whats left into
parserimpl.jar (just the implementation).  In xerces, do the same: open that
jars and separate the implementations from the interfaces (whites from
yolks).  Put the interfaces in orgdom1.jar and orgdom2.jar.  Like this, we
should be able to mix and match as needed.

This has worked for me in VAJ to date, but needs some more testing of the
myriad combinations.

good luck (we need it)

p.s. As I constantly whine about, why it is reasonable for the servlet
engine to force all servlets to cope with its choice of xml interfaces
eludes me (especially given that there are dozens and the specs spin
constantly)  If you, me or anyone else was trying to place webapps on a
hosting service using Tomcat, we'd all be dead meat on a stick (DMOS).

View raw message