You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Riley,R" <R....@lse.ac.uk> on 2000/12/07 11:39:57 UTC

tomat - how it works - caches servlets?

Hi 

I'm new to tomcat and am struggling to understand why a re-compiled class is
not being used by a servlet.  I've cleared out the 'work' directory.

I've tried starting and stopping tomcat and have all of the servlets class
files in jars in its webapps classes directory and the server.xml has the
servlet's context set to reloadable="true"

As I understood it new class definitions should be picked up when tomcat is
re-started.  A reloadable="true" should result in the new definition being
picked up even without re-starting tomcat.  But I'm still getting an old
class from a ,now, non-existent, jar file being used.

Does tomcat cache servlet output?  This might explain why an 'old' page is
being returned.  If tomcat caches servlet pages is it possible to
configure/clear the cache?

Many thanks

Ron Riley

Re: tomat - how it works - caches servlets?

Posted by Kief Morris <ki...@bitBull.com>.
First of all, are you using Tomcat 3.2? Version 3.1 has lots of bugs. 3.2
is much better about loading and reloading classes.

Riley,R typed the following on 10:39 07/12/2000 +0000
 >I've tried starting and stopping tomcat and have all of the servlets class
 >files in jars in its webapps classes directory and the server.xml has the

Are they in webapps/MYAPP/WEB-INF/lib, or webapps/MYAPP/WEB-INF/classes?
The lib directory should be used for .jar files, classes for .class files 
(in the correct
hierarchy).

Are you sure Tomcat is using the .jar file you think it is? What happens if 
you
completely delete the jar file?

 >Does tomcat cache servlet output?  This might explain why an 'old' page is
 >being returned.  If tomcat caches servlet pages is it possible to
 >configure/clear the cache?

It shouldn't - are you 100% sure your browser isn't doing the caching?
Try clearing your browser's cache, exit and reopen it.


---
               bitBull makes the Internet bite: http://www.bitBull.com/demos/