From: kkolinko
Among many other changes, the JavaSE 5 release packages the JAXP APIs, and -a version of Apache Xerces, inside the JRE. This has impacts on applications -that wish to use their own XML parser.
+Starting with Java 1.4 a copy of JAXP APIs and an XML parser are packed +inside the JRE. This has impacts on applications that wish to use their own +XML parser.
-In previous versions of Tomcat, you could simply replace the XML parser
-in the $CATALINA_HOME/common/lib directory to change the parser
+
In old versions of Tomcat, you could simply replace the XML parser +in the Tomcat libraries directory to change the parser used by all web applications. However, this technique will not be effective -when you are running on JSE 5, because the usual class loader delegation -process will always choose the implementation inside the JDK in preference -to this one.
+when you are running modern versions of Java, because the usual class loader +delegation process will always choose the implementation inside the JDK in +preference to this one. -JDK 1.5 supports a mechanism called the "Endorsed Standards Override -Mechanism" to allow replacement of APIs created outside of the JCP (i.e. -DOM and SAX from W3C). It can also be used to update the XML parser +
Java supports a mechanism called the "Endorsed Standards Override +Mechanism" to allow replacement of APIs created outside of the JCP +(i.e. DOM and SAX from W3C). It can also be used to update the XML parser implementation. For more information, see: http://download.oracle.com/javase/1.5.0/docs/guide/standards/index.html.
Tomcat utilizes this mechanism by including the system property setting
-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS in the
-command line that starts the container.