tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Humphries <thad.humphr...@gmail.com>
Subject Re: tomcat caching of static files
Date Fri, 06 Aug 2010 01:15:15 GMT
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 <swoodbury@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message