tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: HttpServlet not found?
Date Tue, 29 Nov 2005 19:40:53 GMT
> From: Martin Gainty [] 
> Subject: Re: HttpServlet not found?
> (otherwise take servlet-api.jar off CLASSPATH and put back 
> j2ee.jar to $J2EE_HOME\lib\j2ee.jar and place on CLASSPATH)

I think you'll need to do more than that.  Tomcat has a variety of class
loaders, including one for each webapp, one for classes shared among all
webapps, and one for classes common to the webapps and Tomcat itself.
(This is in addition to the ones used by the JVM.)  See:
for details.  The picture there is quite illustrative.

This creates a tree of classloaders, and you will run into problems if
the same classes are present in more than one place along a particular
branch of the tree.  I've gotten burned too many times by the CLASSPATH
environment variable to use it anymore - I'd strongly suggest you delete
that variable and use explicit -cp settings where necessary.  This will
help to prevent any classes showing up under the wrong loader

The gist of all this is that you don't want both j2ee.jar and
servlet-api.jar to be available to either your compilations or during
Tomcat execution.  It's possible that you might be able to replace
servlet-api.jar with j2ee.jar in Tomcat's common/lib, but I haven't
personally tried it.

 - Chuck

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message