You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Wise, Bowden (Research)" <wi...@crd.ge.com> on 2002/08/23 13:39:30 UTC

Why does TOMCAT return cache page when file has been modified??

Hi

Please review my original message below and let me know
if you have seen this or know why it is happening

thanks
Bowden

>-----Original Message-----
>From: Wise, Bowden (Research) 
>Sent: Thursday, August 22, 2002 5:13 PM
>To: 'tomcat-user@jakarta.apache.org'
>Subject: Tomcat Retrieves old cached file after file update
>
>
>Hi
> 
>I am finding that Tomca4.0.3 is returning old cached content
>even after the underlying file has been modified.  
> 
>I have a servlet and JSP that work together, the servlet modifies
>a file in a web accessible directory (via FileWriter) and then
>redirects to the JSP which uses a URL to read the content
>of the file and display it.
> 
>Once redirected, even though the file changed, the data displayed
>is the old content. 
> 
>I wrote a simple program to test this further:
>  write to the file
>  read content
>  write new content
>  second read of content
> 
>the second read always returns the first content when tested
>under Tomcat but when testing on an Apache web server
>this problem does not happen as the new content is always
>returned.
> 
>if I pause for 5 seconds between the first read and the 
>write of the new content, the latst data is obtained by
>the second read... 
> 
>however, a pause of 1 second still reveals the old content
> 
>Does the tomcat cache mechanism need a few seconds
>before it realizes that a file has changed?? 
>
>Bowden 
>g GE Global Research Center 
>___________________________ 
>G. Bowden Wise 
> <ma...@research.ge.com> wisegb@research.ge.com
>Information and Decision Technologies 
>GE Global Research Center 
>Building K1, Room 5B2C 
>PO Box 8                            | One Research Circle 
>Schenectady, NY 12301       | Niskayuna NY 12309 
>Phone: 518-387-7833           | Fax: 518-387-6104 
>
> 
>
>Bowden 
>g GE Global Research Center 
>___________________________ 
>G. Bowden Wise 
> <ma...@research.ge.com> wisegb@research.ge.com
>Information and Decision Technologies 
>GE Global Research Center 
>Building K1, Room 5B2C 
>PO Box 8                            | One Research Circle 
>Schenectady, NY 12301       | Niskayuna NY 12309 
>Phone: 518-387-7833           | Fax: 518-387-6104 
>
> 
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>