Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 58797 invoked from network); 19 Dec 2000 13:11:46 -0000 Received: from mel.alcatel.fr (212.208.74.132) by locus.apache.org with SMTP; 19 Dec 2000 13:11:46 -0000 Received: from aifhs2.alcatel.fr (mailhub.alcatel.fr [155.132.180.80]) by mel.alcatel.fr (ALCANET/SMTP) with ESMTP id OAA04869 for ; Tue, 19 Dec 2000 14:11:25 +0100 Received: from dns1.nextenso.alcatel.fr (dns1.nextenso.alcatel.fr [139.54.130.251]) by aifhs2.alcatel.fr (ALCANET/SMTP2) with ESMTP id OAA07305 for ; Tue, 19 Dec 2000 14:07:44 +0100 (MET) Received: from nx0017 (nx0017.nextenso.alcatel.fr [139.54.130.17]) by dns1.nextenso.alcatel.fr (8.9.3/8.9.3) with SMTP id PAA22895 for ; Tue, 19 Dec 2000 15:14:40 +0100 Message-ID: <013d01c06982$a686f020$1182368b@nextenso.alcatel.fr> From: "???" To: References: <3A3E715C.BE758D7@smart911.com> Subject: Re: CLASSPATH precedence Date: Tue, 19 Dec 2000 14:12:22 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N David, For tomcat 3.2 (tomcat 4.0 is different), the classes from = $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib and = $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/classes sont loaded by a custome = classloader. The classes from system CLASSPATH sont loaded by the system = classloader. The class loading is in the following order: 1) BootStrap; = 2)Extension; 3) System Classpath; 4) special directories known by the = custom classloader, so 1) the classes in $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib and in $TOMCAT_HOME/webapps/WEBAPP_B/WEB-INF/lib sont completly = different. 2) The classes in the system CLASSPATH take precedence. Regards -Peiqiang ----- Original Message -----=20 From: "David Miller" To: Sent: Tuesday, December 19, 2000 4:19 AM Subject: CLASSPATH precedence > Hi, >=20 > Two related questions regarding CLASSPATH precedence: >=20 > (A) If I place the same *.jar files (same names but different = versions) > in both > $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib > and in $TOMCAT_HOME/webapps/WEBAPP_B/WEB-INF/lib >=20 > does the version of the *.jar files in WEBAPP_A or in WEBAPP_B take > precedence? Or does it depend on which context I am in (i.e., which > webapp tomcat is running). How does tomcat figure out which version of > the *.jar files to use? Do classes loaded from one *.jar file get > unloaded if I am running in a different context? >=20 > (B) (similar question but for system *.jar files vs tomcat *.jar = files): >=20 > If I place the same *.jar files (same names but different versions) in > both > $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib > and in my system CLASSPATH >=20 > which version of the *.jar files take precedence when I am running ? >=20 > Any answers/information regarding these two questions is greatly > appreciated, especially ones which shed some light on how tomcat = figures > out which version of classes to load. Thanks, >=20 > -David- >=20 >=20