You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bob Jamison <rj...@lincom-asg.com> on 2000/07/02 00:17:21 UTC
Using xerces/jaxp with Tomcat
A few days ago, I saw a posting here about using xerces by
including the jar file before other parser libraries. Sun's JAXP,
however, defaults to com.sun.xml...... , so if jaxp.jar is used,
I have found that this property definition works for xerces1.1.2:
-Djavax.xml.parsers.SAXParserFactory=
org.apache.xerces.jaxp.SAXParserFactoryImpl
This class appears to be a recent arrival, and is not in 1.1.1.
Also, xerces 1.1.2 has its own jaxp implementation,
with (apparently) a default to its own ParserFactories.
So xerces.jar without jaxp.jar, and without the property
setting seems to work also.
Since Jasper-jsp still has hardcoded com.sun.xml dependencies,
it is still necessary to include parser.jar.
So the following two methods seem to work for me:
1. Copy xerces.jar into the /lib directory, set the -D property
in the startup scripts somewhere.
2. Copy xerces.jar into the /lib directory, remove jaxp.jar.
Hope this helps. This should aid those interested in using
some of the other Apache/XML projects in Tomcat,
which might have conflicted with ProjectX.
Bob Jamison
LinCom Corp