I just went through this today myself : )

This is on the FAQ on the Jakarta page. . . just remove the servlet
directory from your CLASSPATH

The CLASSPATH cannot contain servlets one wants to reload. . . Even if
reload is set it will ignore it if so. . . .

[ Ian Guthrie  ][  Director of R&D ][  Ezenet Inc. ]
[ http://www.ezenet.com ][ mailto:[EMAIL PROTECTED] ]


> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: November 07, 2000 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Tomcat Caching problem
> 
> 
> "Sunny L.S.Chan" wrote:
> 
> > Hi all, does anynoe encountered this problem, where by 
> tomcat 3.1 standalone
> > kept displaying a cached copy of the servlet file instead 
> of loading the
> > servlet everytime it is executed?
> >
> > Apparently it won't grab the form values in my doGet, and 
> also everytime I
> > recompile the servlet,  on re-load it gives me the previous 
> copy at which I
> > have to restart tomcat to get the latest copy.
> >
> > I have included all these stuff below in my servlet:
> >
> >   res.setHeader("Cache-Control","no-cache");
> >   res.setHeader("Pragma","no-cache");
> >   res.setDateHeader ("Expires", 0); //prevents caching at 
> the proxy server
> >
> > I suppose these settings tell the browser not to cache that 
> page, also in my
> > server.xml file I have set the reloadable="true" in the context path
> > setting, but apparently tomcat still caches the page
> >
> > Any help is appreciated :)
> >
> 
> It's not going to be much comfort to you, but ... Tomcat 3.1 
> caches *no* static
> pages on it's own.
> 
> If you modify a servlet, you will need to ensure that Tomcat 
> is restarted before
> the changes will be visible.  This can be done by manually 
> shutting it down and
> restarting it, or by marking this webapp as "reloadable" in 
> the server.xml file.
> 
> WARNING:  Even if you make your webapp reloadable, Tomcat can 
> only pick up
> changes to servlets that are in the WEB-INF/classes or 
> WEB-INF/lib directories
> of your webapp.  If the classes are on the CLASSPATH, your 
> only option is to
> manually restart.
> 
> >
> > Thankx
> 
> Craig McClanahan
> 
> 

Reply via email to