tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swoodbury <>
Subject tomcat caching of static files
Date Thu, 05 Aug 2010 20:42:25 GMT


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:
Sent from the Tomcat - User mailing list archive at

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

View raw message