[jdom-interest] Problem with JDOM / Resin / JDK1.3

Jason Hunter jhunter at collab.net
Tue Apr 17 14:12:29 PDT 2001

> Is there anybody have an idea to force Resin to use
> Xerces instead of its default parser when I call
> SAXBuilder ?

This is a big problem with servlets and XML in general because servers
use XML parsers to read the web.xml file and those XML parser classes
are then as a side-effect exposed to servlets which can cause nasty
conflicts like you're seeing.  The short-term workaround is to make sure
your server classpath puts the newer classes first.  If you can't do
that due to ISP limitations or something, you can probably create your
own classloader for the job.  Not sure of the details, so don't respond
to this saying "how exactly?", but class loaders are very flexible and
I'm sure it's possible.  The long-term solution is to get a servlet
engine that supports API 2.3 because API 2.3 explicitly requires servers
not "pollute" the servlet environment with any server-needed classes
like XML parsers.  They have to use their own class loaders, similar to
what I'm suggesting you try creating.


More information about the jdom-interest mailing list