From: kkolinko Date: Sat, 30 Jul 2011 13:57:51 +0000 (+0000) Subject: Improve class loading documentation X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=66892ac13e9857c596937de722fa27ed48ad00bb;p=tomcat7.0 Improve class loading documentation Improve documentation about $CATALINA_HOME/endorsed. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1152463 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/class-loader-howto.xml b/webapps/docs/class-loader-howto.xml index a8c3539d2..ff04630d7 100644 --- a/webapps/docs/class-loader-howto.xml +++ b/webapps/docs/class-loader-howto.xml @@ -195,29 +195,31 @@ loading looks in the following repositories, in this order:

-
+
-

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.

+command line that starts the container. The default value of this option is +$CATALINA_HOME/endorsed. This endorsed directory is not +created by default.