Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 18084 invoked from network); 26 Dec 2001 19:57:06 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Dec 2001 19:57:06 -0000 Received: (qmail 11049 invoked by uid 97); 26 Dec 2001 19:56:58 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 11018 invoked by uid 97); 26 Dec 2001 19:56:57 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 11007 invoked from network); 26 Dec 2001 19:56:57 -0000 Message-ID: From: Anand Bashyam Narasimham To: 'Tomcat Developers List' Subject: RE: Default classes loaded by Tocmat Date: Wed, 26 Dec 2001 11:56:45 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Craig, I get the idea but as u said if the Web-app class loader delegates it to the Parent Class loader and at some point it will go to the VM's primary class loader. If that is how it works then while I start tomcat my entire JDK's classes are in the Class path so if I have a JSP that uses java.util.Vector and not included in the "<@import" list the JSP should compile. However it does not. I'm using tomcat 3.3 If I remember right there was a significant change in how classes are loaded from 3.3 to 4.0. Thanks. Anand -----Original Message----- From: Craig R. McClanahan [mailto:craigmcc@apache.org] Sent: Wednesday, December 26, 2001 11:50 AM To: Tomcat Developers List Subject: Re: Default classes loaded by Tocmat On Wed, 26 Dec 2001, Anand Bashyam Narasimham wrote: > Date: Wed, 26 Dec 2001 11:02:43 -0800 > From: Anand Bashyam Narasimham > Reply-To: Tomcat Developers List > To: "Tomcat Dev Mailing List (E-mail)" > Subject: Default classes loaded by Tocmat > > Hi, > > I was wondering why default classes from core Java packages like > "java.util.*" etc are not loaded automaitcally in the Classloader. Does the > spec say anything about this. I do know that a lot of the Servlet engines in > the market do such automatic classloading. Can someone tell me why this is > not done so in Tomcat? > Servlet Specification, Version 2.3, Section 9.7.2: "It [the application class loader] must not allow the WAR to override J2SE or Java servlet API classes." Thus, the webapp class loader MUST refuse to load java.* and javax.servlet.* classes from /WEB-INF/classes or /WEB-INF/lib, or else it is broken. However, it will delegate such requests to the parent class loader, so your application uses the versions of things like java.util.HashMap that are provided by the JDK or JRE you are running under. By the same token, trying to put servlet.jar inside a web app will be ignored -- the servlet.jar that Tomcat provides is used to supply the servlet and JSP API classes. For more information on how Tomcat 4 class loading works, see the documentation that is included with Tomcat, or available online: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html > Thanks > Anand B N > Associate Developer,Engineering > 1320 Harbor Bay Parkway > Alameda,CA > Phone - (415) 625 41976 > Craig McClanahan -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: