tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.rs>
Subject Re: Any way to make tomcat send the "disable caching" headers on all responses?
Date Tue, 18 Aug 2009 08:10:52 GMT
Epithemeus wrote:
> What is happening in practice is that: the xml file is indeed updated but
> the graph being displayed is an older version (corresponding to the older
> .xml file which has now been over-written). I gather that this means tomcat
> is caching the xml files.
> 
> I have tried including "cachingAllowed" to false in context.xml. I have also
> deleted the application_folder under $TOMCAT_HOME\work\Catalina\localhost\.
> Neither of these options has helped in disabling caching.
> 
> I would really appreciate any help on how I could get around this!

You could add parameter to the URL of the XML file, that changes every 
time the file is modified. Something like

    src="data.xml?lastModificationTime=20090818000000"

or

    src="data.xml?hash=SOMEHASH(data.xml)"

or simply to read file every time, not only when it is changed:

    src="data.xml?currentSystemTime=20090818100601"

The change in parameter will force the client to reload the file.

The same thing is possible for CSS, images and other resources.

Regards,
Ognjen

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


Mime
View raw message