cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml realm-howto.xml
yoavs 2004/09/03 14:58:39 Modified:webapps/docs Tag: TOMCAT_5_0 class-loader-howto.xml realm-howto.xml Log: A couple of typo fixes, courtesy of Ed Dodds. Revision ChangesPath No revision No revision 1.11.2.1 +1 -1 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- class-loader-howto.xml16 Jun 2004 18:04:39 - 1.11 +++ class-loader-howto.xml3 Sep 2004 21:58:39 - 1.11.2.1 @@ -197,7 +197,7 @@ instead of delegating before looking. There are exceptions. Classes which are part of the JRE base classes cannot be overriden. For some classes (such as the XML parser components in JDK 1.4+), the JDK 1.4 endorsed feature can be -used used +used (see the common classloader definition above). In addition, for the following class patterns, the classloader will always delegate first (and load the class itself if no parent classloader loads it): 1.14.2.2 +1 -1 jakarta-tomcat-catalina/webapps/docs/realm-howto.xml Index: realm-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/realm-howto.xml,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -u -r1.14.2.1 -r1.14.2.2 --- realm-howto.xml 21 Aug 2004 15:50:08 - 1.14.2.1 +++ realm-howto.xml 3 Sep 2004 21:58:39 - 1.14.2.2 @@ -1372,7 +1372,7 @@ techniques are supported: If you are writing an application that needs to calculate digested -passowrds dynamically, call the static Digest() method of the +passwords dynamically, call the static Digest() method of the org.apache.catalina.realm.RealmBase class, passing the cleartext password and the digest algorithm name as arguments. This method will return the digested password. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml realm-howto.xml
yoavs 2004/09/03 14:57:53 Modified:webapps/docs class-loader-howto.xml realm-howto.xml Log: A couple of typo fixes, courtesy of Ed Dodds. Revision ChangesPath 1.13 +1 -1 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- class-loader-howto.xml1 Sep 2004 22:04:27 - 1.12 +++ class-loader-howto.xml3 Sep 2004 21:57:53 - 1.13 @@ -203,7 +203,7 @@ instead of delegating before looking. There are exceptions. Classes which are part of the JRE base classes cannot be overriden. For some classes (such as the XML parser components in J2SE 1.4+), the J2SE 1.4 endorsed feature can be -used used +used (see the common classloader definition above). In addition, for the following class patterns, the classloader will always delegate first (and load the class itself if no parent classloader loads it): 1.16 +1 -1 jakarta-tomcat-catalina/webapps/docs/realm-howto.xml Index: realm-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/realm-howto.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- realm-howto.xml 21 Aug 2004 12:39:08 - 1.15 +++ realm-howto.xml 3 Sep 2004 21:57:53 - 1.16 @@ -1372,7 +1372,7 @@ techniques are supported: If you are writing an application that needs to calculate digested -passowrds dynamically, call the static Digest() method of the +passwords dynamically, call the static Digest() method of the org.apache.catalina.realm.RealmBase class, passing the cleartext password and the digest algorithm name as arguments. This method will return the digested password. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
yoavs 2004/06/16 08:50:30 Modified:webapps/docs class-loader-howto.xml Log: Added clarifications per Bugzilla 29389. Revision ChangesPath 1.10 +5 -2 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- class-loader-howto.xml2 Feb 2004 21:39:28 - 1.9 +++ class-loader-howto.xml16 Jun 2004 15:50:30 - 1.10 @@ -8,6 +8,7 @@ Craig R. McClanahan +Yoav Shapira Class Loader HOW-TO @@ -103,6 +104,7 @@ logging API. $CATALINA_HOME/bin/commons-daemon.jar - Jakarta commons daemon API. +jmx.jar - The JMX 1.2 implementation. Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web @@ -124,7 +126,6 @@ commons-pool.jar - Jakarta commons pool. jasper-compiler.jar - The JSP 2.0 compiler. jasper-runtime.jar - The JSP 2.0 runtime. -jmx.jar - The JMX 1.2 implementation. jsp-api.jar - The JSP 2.0 API. naming-common.jar - The JNDI implementation used by Tomcat 5 to represent in-memory naming contexts. @@ -189,7 +190,8 @@ As mentioned above, the web application class loader diverges from the default Java 2 delegation model (in accordance with the recommendations in the -Servlet Specification, version 2.3, section 9.6). When a request to load a +Servlet Specification, version 2.3, section 9.7.2 Web Application Classloader). +When a request to load a class from the web application's WebappX class loader is processed, this class loader will look in the local repositories first, instead of delegating before looking. There are exceptions. Classes which are @@ -205,6 +207,7 @@ org.w3c.dom.* org.apache.xerces.* org.apache.xalan.* + Last, any JAR containing servlet API classes will be ignored by the classloader. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
markt 2004/02/02 13:39:28 Modified:webapps/docs class-loader-howto.xml Log: - Fix 13805. Update docs to show that the shared directory is relative to CATALINA_BASE not CATALINA_HOME. - Reported by Michael Eriksson. Revision ChangesPath 1.9 +6 -6 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- class-loader-howto.xml1 Feb 2004 22:43:21 - 1.8 +++ class-loader-howto.xml2 Feb 2004 21:39:28 - 1.9 @@ -27,9 +27,9 @@ application archive. For classes and resources that must be shared across all web applications, place unpacked classes and resources under -$CATALINA_HOME/shared/classes, or place JAR files +$CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under -$CATALINA_HOME/shared/lib. +$CATALINA_BASE/shared/lib. @@ -172,8 +172,8 @@ web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in -$CATALINA_HOME/shared/classes, as well as classes and -resources in JAR files under $CATALINA_HOME/shared/lib, are +$CATALINA_BASE/shared/classes, as well as classes and +resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. If multiple Tomcat instances are run from the same binary using the $CATALINA_BASE environment variable, then this classloader repositories are relative to $CATALINA_BASE rather @@ -220,8 +220,8 @@ $CATALINA_HOME/common/classes $CATALINA_HOME/common/endorsed/*.jar $CATALINA_HOME/common/lib/*.jar -$CATALINA_HOME/shared/classes -$CATALINA_HOME/shared/lib/*.jar +$CATALINA_BASE/shared/classes +$CATALINA_BASE/shared/lib/*.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
markt 2004/02/01 14:43:21 Modified:webapps/docs class-loader-howto.xml Log: - Fix bug 13772. Add a link to the security manager how-to. - Reported by Greg Bullough. Revision ChangesPath 1.8 +9 -0 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- class-loader-howto.xml13 Sep 2003 14:58:09 - 1.7 +++ class-loader-howto.xml1 Feb 2004 22:43:21 - 1.8 @@ -256,6 +256,15 @@ + + +When running under a security manager the locations from which classes +are permitted to be loaded will also depend on the contents of your policy +file. See Security Manager HOW-TO +for further information. + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
funkman 2003/09/13 07:58:09 Modified:webapps/docs class-loader-howto.xml Log: typo fix per Per 9766 Revision ChangesPath 1.7 +1 -1 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- class-loader-howto.xml8 Sep 2003 22:03:32 - 1.6 +++ class-loader-howto.xml13 Sep 2003 14:58:09 - 1.7 @@ -21,7 +21,7 @@ files to make them available to web applications: For classes and resources specific to a particular web application, -place unpacked classes and resources under /WEB-INF/classe +place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
luehe 2003/09/08 15:03:32 Modified:webapps/docs class-loader-howto.xml Log: - Fixed classloader delegation order as seen from webapp perspective. - Removed "org.apache.commons.logging.*" from list of packages that trigger delegation to parent (the doc already mentions that commons-logging-api.jar is now loaded by the system classloader) Revision ChangesPath 1.6 +2 -3 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- class-loader-howto.xml8 Sep 2003 13:49:32 - 1.5 +++ class-loader-howto.xml8 Sep 2003 22:03:32 - 1.6 @@ -203,7 +203,6 @@ javax.* org.xml.sax.* org.w3c.dom.* -org.apache.commons.logging.* org.apache.xerces.* org.apache.xalan.* @@ -214,10 +213,10 @@ Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order: -/WEB-INF/classes of your web application -/WEB-INF/lib/*.jar of your web application Bootstrap classes of your JVM System class loader classses (described above) +/WEB-INF/classes of your web application +/WEB-INF/lib/*.jar of your web application $CATALINA_HOME/common/classes $CATALINA_HOME/common/endorsed/*.jar $CATALINA_HOME/common/lib/*.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
I think the current description of the classloader delegation model from a web application's perspective is still somewhat misleading. Currently, the document describes this order: /WEB-INF/classes of your web application /WEB-INF/lib/*.jar of your web application Bootstrap classes of your JVM System class loader classses (described above) [...] Shouldn't this really be: Bootstrap classes of your JVM System class loader classses (described above) /WEB-INF/classes of your web application /WEB-INF/lib/*.jar of your web application [...] Otherwise, Remy's fix of putting commons-logging-api.jar in the system class loader would not have worked, as org.apache.commons.logging.Log would be loaded by two different classloaders (the system classloader and the WebappClassLoader), and Log.class.isAssignableFrom(logClass) in LogFactoryImpl.getLogConstructor would return false. Also, this would be consistent with the impl of WebappClassLoader.loadClass, which calls "system.loadClass(name)" *before* checking to see if the classloading should be delegated to the parent, and it would be consistent with a description of how/when WebappX delegates earlier in the document ("[...] There are exceptions. Classes which are part of the JRE base classes cannot be overriden [...]"). Also, I think "org.apache.commons.logging.* " should no longer be called out in the list of packages that trigger delegation, as it has been superseded by placing commons-logging-api.jar in $CATALINA_HOME/bin. Following is a patch: Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.5 diff -u -r1.5 class-loader-howto.xml --- class-loader-howto.xml 8 Sep 2003 13:49:32 - 1.5 +++ class-loader-howto.xml 8 Sep 2003 17:23:56 - @@ -203,7 +203,6 @@ javax.* org.xml.sax.* org.w3c.dom.* -org.apache.commons.logging.* org.apache.xerces.* org.apache.xalan.* @@ -214,10 +213,10 @@ Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order: -/WEB-INF/classes of your web application -/WEB-INF/lib/*.jar of your web application Bootstrap classes of your JVM System class loader classses (described above) +/WEB-INF/classes of your web application +/WEB-INF/lib/*.jar of your web application $CATALINA_HOME/common/classes $CATALINA_HOME/common/endorsed/*.jar $CATALINA_HOME/common/lib/*.jar Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
remm2003/09/08 06:49:32 Modified:webapps/docs class-loader-howto.xml Log: - Update the classloader contents. Revision ChangesPath 1.5 +4 -1 jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- class-loader-howto.xml5 Sep 2003 08:56:01 - 1.4 +++ class-loader-howto.xml8 Sep 2003 13:49:32 - 1.5 @@ -99,6 +99,10 @@ implementation classes it depends on. $JAVA_HOME/lib/tools.jar - Contains the "javac" compiler used to convert JSP pages into servlet classes. +$CATALINA_HOME/bin/commons-logging-api.jar - Jakarta commons +logging API. +$CATALINA_HOME/bin/commons-daemon.jar - Jakarta commons +daemon API. Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web @@ -117,7 +121,6 @@ JDBC connection pool to web applications. commons-el.jar - Jakarta commons el, implementing the expression language used by Jasper. -commons-logging-api.jar - Jakarta commons logging API. commons-pool.jar - Jakarta commons pool. jasper-compiler.jar - The JSP 2.0 compiler. jasper-runtime.jar - The JSP 2.0 runtime. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs class-loader-howto.xml
remm2003/09/05 01:56:01 Modified:webapps/docs class-loader-howto.xml Log: - Classloader docs refresh. Revision ChangesPath 1.4 +40 -30jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml Index: class-loader-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/class-loader-howto.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- class-loader-howto.xml15 Jan 2003 03:40:43 - 1.3 +++ class-loader-howto.xml5 Sep 2003 08:56:01 - 1.4 @@ -111,19 +111,29 @@ are made visible through this class loader. By default, that includes the following: -jndi.jar - The Java Naming and Directory Interface API -classes (loaded ONLY on a JDK 1.2 system, because they -are included automatically on JDK 1.3 and later). +ant.jar - Apache Ant. +commons-collection.jar - Jakarta commons collection. +commons-dbcp.jar - Jakarta commons DBCP, providing a +JDBC connection pool to web applications. +commons-el.jar - Jakarta commons el, implementing the +expression language used by Jasper. +commons-logging-api.jar - Jakarta commons logging API. +commons-pool.jar - Jakarta commons pool. +jasper-compiler.jar - The JSP 2.0 compiler. +jasper-runtime.jar - The JSP 2.0 runtime. +jmx.jar - The JMX 1.2 implementation. +jsp-api.jar - The JSP 2.0 API. naming-common.jar - The JNDI implementation used by Tomcat 5 to represent in-memory naming contexts. +naming-factory.jar - The JNDI implementation used by Tomcat 5 +to resolve references to enterprise resources (EJB, connection +pools). naming-resources.jar - The specialized JNDI naming context implementation used to represent the static resources of a web application. -servlet.jar - The Servlet and JSP API classes. +servlet-api.jar - The Servlet and JSP API classes. xerces.jar - The XML parser that is visible by default to -Tomcat internal classes and to web applications. This can be -overridden, for a particular web application, by including your -desired parser in /WEB-INF/lib. +Tomcat internal classes and to web applications. Catalina - This class loader is initialized to include all classes and resources required to implement Tomcat 5 itself. These @@ -148,18 +158,11 @@ tomcat-coyote.jar - Coyote connector for Tomcat 5. tomcat-http11.jar - Standalone Java HTTP/1.1 connector. -tomcat-jk.jar - Classes for the Java portion of the -JK web server connector, which allows Tomcat to -run behind web servers such as Apache and iPlanet iAS and iWS. tomcat-jk2.jar - Classes for the Java portion of the JK 2 web server connector, which allows Tomcat to run behind web servers such as Apache and iPlanet iAS and iWS. tomcat-util.jar - Utility classes required by some Tomcat connectors. -tomcat-warp.jar - Classes for the Java portion of the -Webapp web server connector, using the WARP protocol -which allows Tomcat to run behind the Apache HTTPD web server -(1.3 and 2.0). Shared - This class loader is the place to put classes and resources that you wish to share across ALL @@ -167,20 +170,11 @@ in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_HOME/shared/classes, as well as classes and -resources in JAR files under $CATALINA_HOME/lib, are -made visible through this class loader. By default, that includes -the following: - -jasper-compiler.jar - The page compiler classes required -to convert JSP source pages into executable servlets and compile -them. -jasper-runtime.jar - The runtime support classes required -to execute JSP pages that have already been translated into Java -servlets and then compiled. -naming-factory.jar - JNDI object factories for resources -supported by the default JNDI naming context provided to web -applications. - +resources in JAR files under $CATALINA_HOME/shared/lib, are +made visible through this class loader. If multiple Tomcat instances are +run from the same binary using the $CATALINA_BASE environment variable, +then this classloader repositories are relative to $CATALINA_BASE rather +than $CATALINA_HOME. WebappX - A class loader is created for each web application that is deployed in a single Tomcat 5 instance. All unpacked classes and resources in the /WEB-INF/classes directory of @@ -195,8 +189,24 @@ Servle