Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 27970 invoked from network); 1 May 2002 17:47:43 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 1 May 2002 17:47:43 -0000 Received: (qmail 9883 invoked by uid 97); 1 May 2002 17:47:27 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 9765 invoked by alias); 1 May 2002 17:47:26 -0000 Delivered-To: jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 9746 invoked by uid 97); 1 May 2002 17:47:26 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 9734 invoked by uid 98); 1 May 2002 17:47:25 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <3CD02893.6A74B597@artfulsoftware.com> Date: Wed, 01 May 2002 10:40:35 -0700 From: peter.brawley@artfulsoftware.com Organization: Artful X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Tomcat Users List Subject: Tomcat & class visibility References: <000001c1f129$40f55e60$0fe95c18@caledan> Content-Type: multipart/alternative; boundary="------------040AA46FCC157E1C5F90B8CF" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------040AA46FCC157E1C5F90B8CF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit We're trying to understand the rules governing class visibility under Tomcat. The docs say that in the hierarchy like the one reproduced below, classloaders can access classes beneath them, but not beside or above them. From which it follows ... (i) webapps can't access the XML parser in crimson/xalan.jars without 'intervention', (ii) putting a jar containing classes that extend servlet.jar on the CLASSPATH won't work, because servlet.jar is above the Application Classloader, so Tomcat has to override CLASSPATH and the class must be in lib/common or above. We'd like to know if this is correct or not, and whether there are rules we've missed. Thanks for your attention. P. The hierarchy ... CATALINA_HOME bin classes common classes lib conf lib logs server classes lib webapps examples images jsp servlets WEB-INF manager (many dirs) ROOT WEB-INF classes lib work TOMCAT_HOME/lib/container (Server Classloader) crimson.jar facade22.jar TOMCAT_HOME/.../WEB-INF/classes jasper.jar (Web Apps classloaders) tomcat_modules.jar tomcat_util.jar TOMCAT_HOME/lib/apps xalan.jar (Apps Classloader) commons-collections.jar commons-dbcp.jar commons-pool.jar TOMCAT_HOME/lib/common (Common Classloader) connector_util.jar core_util.jar etomcat.jar jasper-runtime.jar servlet.jar tomcat_core.jar TOMCAT_HOME/lib/tomcat.jar (Application Classloader, CLASSPATH Classloader) User class files JAVA_HOME/jre/lib/ext (JDK Extensions Classloader) --------------040AA46FCC157E1C5F90B8CF--