RE: tomcat caching of static files

2010-08-08 Thread Karthik Nanjangude
Hi

Try using the CACHE Filter technique

URL : http://code.google.com/p/cache-filter/



With regard
karthik

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Saturday, August 07, 2010 9:54 PM
To: Tomcat Users List
Subject: RE: tomcat caching of static files

 From: swoodbury [mailto:swoodb...@att.net]
 Subject: Re: tomcat caching of static files

 So the only thing left as far as i can see is the tomcat
 server caching the file in memory and not noticing the
 timestamp change when the thread re-creates the file.

Or some intermediary device between the client and server.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat caching of static files

2010-08-07 Thread swoodbury



Are you sure it's Tomcat doing the caching?  I've found that both Firefox
and IE will cache CGI, JSP, servlet, and other dynamic results.  

yes, i'm approaching certain that it isn't a browser issue.  If i delete the
static files and thus force the system to regen i get updated data, but the
url etc is identical as far as the browser is concerned.  it's only if the
thread causes the regen that the action doesn't know and uses old data.  If
i hand-edit the static file, i also get updated data.  there again the url
etc that the browser sees is identical.  So the only thing left as far as i
can see is the tomcat server caching the file in memory and not noticing the
timestamp change when the thread re-creates the file.

very strange.
-- 
View this message in context: 
http://old.nabble.com/tomcat-caching-of-static-files-tp29356390p29375144.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: tomcat caching of static files

2010-08-07 Thread Caldarale, Charles R
 From: swoodbury [mailto:swoodb...@att.net]
 Subject: Re: tomcat caching of static files
 
 So the only thing left as far as i can see is the tomcat 
 server caching the file in memory and not noticing the
 timestamp change when the thread re-creates the file.

Or some intermediary device between the client and server.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat caching of static files

2010-08-05 Thread Thad Humphries
Are you sure it's Tomcat doing the caching?  I've found that both Firefox
and IE will cache CGI, JSP, servlet, and other dynamic results.  This has
been true going back to when the old Mozilla 1.x had a preference for
*never* caching.

For GET calls were the results underlying content might change and the
browser not see it, I've taken to adding a bozo param just so the URL is
different:  myServlet+?...+bozo= + System.currentTimeMillis()

On Thu, Aug 5, 2010 at 4:42 PM, swoodbury swoodb...@att.net wrote:


 Hi.

 I have a tomcat - struts web application.

 I have a thread which creates a static datafile each night.   when the user
 accesses the corresponding .do action, that action reads the static file
 and
 presents formatted output.  if the file isn't there for whatever reason, it
 creates it dynamically and then presents the formatted output (still by
 reading the file it just created).

 My problem is that the nightly re-creation works fine, i can see changes in
 the file, and the mod time of the file is updated.  but Tomcat is evidently
 caching the old contents because the old content is still presented to the
 user.  But if i remove the static file and thus force the action to
 re-create it, the new data is presented to the user.  things also work if i
 manually edit the file (say with vi) and save it, the user again gets
 updated information.  but if the thread creates the data, the action never
 sees it.

 Also, both the thread and the action call the same method when generating
 the static data.

 any ideas?
 --
 View this message in context:
 http://old.nabble.com/tomcat-caching-of-static-files-tp29356390p29356390.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)