Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to make Tomcat use the Xerces XML parser instead of the Sun JAXP XML parser?

JAXP parser Sun Tomcat xerces XML
0
Posted

How to make Tomcat use the Xerces XML parser instead of the Sun JAXP XML parser?

0

Location: http://www.jguru.com/faq/view.jsp?EID=525561 Created: Oct 19, 2001 Modified: 2001-11-15 15:27:44.912 Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3) Question originally posed by suraj R (http://www.jguru.com/guru/viewbio.jsp?EID=497669 You can do one of two things: • Replace the Tomcat system files jaxp.jar and parser.jar (located in TOMCAT_HOME/lib) — that is, delete them and install the Xerces jars in their place • Include your preferred XML parser jars (xerces.jar and/or xalan.jar) inside your web application’s WEB-INF/lib The second method is preferred, since then you can run other web applications — and Tomcat itself — without worrying that they’re incompatible with Xalan/Xerces (or whatever your favorite XML parser is). However, it has been known to fail, since Classloader munging is something of a black art and hasn’t always been implemented correctly in Tomcat (or Java). So try #2 first, then if that fails, try #1.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.