Andrew,
I've had similar headaches over the past few days. In an ideal
world you would just put the jars in WEB-INF/lib and everything
would work fine, but it doesn't for Tomcat 3.2. I believe
Tomcat 4.0 will solve the problem by separating those libraries
that Tomcat needs itself from those that you want accessible
from all your web apps, but you don't have this choice in 3.2
AFAIK.
This works for me:
1. Rename, delete, or move jaxp.jar, parser.jar in the
TOMCAT_HOME/lib directory (if you rename, make sure they
don't end in .jar once renamed)
2. Get Xalan 2.1.0 and copy xalan.jar and xerces.jar from the
bin directory into the TOMCAT_HOME/lib directory
Note that there is a bunch of magic going on here. I'll tell
you what I know, hopefully others can add.
First, you don't need jaxp.jar because the JAXP classes are
included in xalan.jar and xerces.jar (for this reason it might
be good to include xalan.jar even if you only need xerces.jar).
Second, there are some magic files:
in xalan.jar:
META-INF/services/javax.xml.transform.TransformerFactory
in xerces.jar:
META-INF/services/javax.xml.parsers.DocumentBuilderFactory
META-INF/services/javax.xml.parsers.SAXParserFactory
These files setup Xerces and Xalan as the provides of the
relevant factory classes for JAXP. This alleviates the need for
messing with startup.{bat,sh} or TOMCAT_OPTS to add the
-Djavax... options.
The most helpful bit of information I found was here:
Section "Installing on Tomcat 3.X"
http://xml.apache.org/cocoon2/install.html
which gives different instructions to what I have above.
Good luck!
-- Andrew
> -----Original Message-----
> From: Andrew Cooke [mailto:[EMAIL PROTECTED]]
> Sent: 31 July 2001 14:42
> To: [EMAIL PROTECTED]
> Subject: SAX 2.0, sealing, Tomcat 3.2.3
>
>
>
> Hi,
>
> I've spent most of the day reading through various mailing list
> entries and other pages on the net and am still confused. Is there a
> FAQ anywhere that clearly summarizes the issues involved and answers
> the questions below? If not, can someone please tell me:
>
> - Should Tomcat 3.2.3 work with JSP pages that use JAXP 1.1 and
> crimson (the XML support from Sun)?
>
> - If so, how do I get it to work?
> -- Someone here says that it depends on the order of jars in the
> classpath. Doesn't seem to make any difference to me - any comments?
> -- I have managed to get past the sealed jar problems by unsealing
> jars, but then get an error suggesting that the code in Tomcat is SAX
> 1.0 (getXmlReader in org.xml.sax.XMLReader doesn't appear to exist,
> which is a SAX 2.0 method?).
>
> - If not, what other choices do I have?
> -- Will Tomcat 4.0 work?
> -- Will Tomcat 4.0 still give errors with sealed jars? Is there a
> work-round?
>
> In particular, our code gives the "usual" sealed jar exception unless
> I unseal our copy of xalan.jar, at which point I get a NoSuchMethod
> call when executing
> SAXParserFactory factory = SAXParserFactory.newInstance()
> in our code.
>
> Thanks,
> Andrew
>