Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 2868 invoked by uid 500); 21 Jul 2001 11:56:03 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Delivered-To: moderator for tomcat-dev@jakarta.apache.org Received: (qmail 72916 invoked from network); 21 Jul 2001 03:15:34 -0000 Date: Fri, 20 Jul 2001 20:15:11 -0700 From: David Rees To: tomcat-dev@jakarta.apache.org Subject: Re: [DOC] Re: [3.2] JSP Compiling Classpath issues -- finding WEB-INF/class es Message-ID: <20010720201511.A13018@greenhydrant.com> Mail-Followup-To: David Rees , tomcat-dev@jakarta.apache.org References: <200107201322.f6KDMLe19217@rm-rstar.sfu.ca> <20010720093722.A8264@greenhydrant.com> <3B586EC6.CA34F6E5@haraburda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B586EC6.CA34F6E5@haraburda.com>; from david@haraburda.com on Fri, Jul 20, 2001 at 12:47:51PM -0500 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Fri, Jul 20, 2001 at 12:47:51PM -0500, David Haraburda wrote: > I don't think unsetting your CLASSPATH is necessary, especially since other > applications may rely on it. I would guess that most problems occur when: > > 1) You add things you have in your WEB-INF/classes to your CLASSPATH (thus causing them > to be loaded by the system class loader, not the Tomcat web app class loader, which > causes problems) > > or, as the case would appear to be with the POET sdk referred to before, > > 2) Your web application requires a certain JAR that you have placed in your WEB-INF/lib > directory, but unbeknownst to you, there is actually another JAR (perhaps an older > version of the software) sitting in your classpath, which gets loaded first. > > Remember, a classloader always asks it's parent classloader to load a resource first, > and then only loads it itself if the parent cannot find it. > > Just make sure things your web application requires are in your WEB-INF/libs directory, > and not in your classpath. > > Craig McClanahan has two good posts about this: > > http://mikal.org/interests/java/tomcat/archive/view?mesg=22444 > http://mikal.org/interests/java/tomcat/archive/view?mesg=8512 Thanks for the tips, what you've described is the exact behavior I've experienced. I just haven't had the time to read up about classloaders and the order which classes are loaded. > As far as logging goes, you may want to check out the elements is your > server.xml file. They provide a good way to keep your terminal un-cluttered. :-) Crap, I never really noticed this one before: Is there any other tricks I've been missing for a while with Tomcat? (I know, getting off-topic for tomcat-dev) Thanks, -Dave