How do I prevent tomcat from caching? I have css and basic html files that I load and use via ajax, and unless I restart tomcat, the changes do not seem to reflect. Different machines, different browsers, and I don't receive the updated files.
Thoughts?
You might have to delete the application cache folder in /work/Catalina/localhost after changing the cachingAllowed flag.
Configuration can be introduced in server.xml as
For Tomcat 8 / Tomcat 9 properties should be added in conf/context.xml as follows
You might have to delete the application cache folder in /work/Catalina/localhost after changing the
cachingAllowed
flag. Also clear the cache of IntelliJ IDEA (if you use it to run Tomcat):See Apache Tomcat 9 Configuration Reference for other parameters.
I had this problem in Tomcat 7 and the reason was that I had antiResourceLocking set to true (it sounded like a good idea...).
According to the docs ( http://tomcat.apache.org/tomcat-7.0-doc/config/context.html ):
In my case it even caused plain static text files to be cached.
So, in summary, at least for rapid development I had to use:
Have you checked this documentation: Apache Tomcat Configuration Reference ?
These parameters are the same for Tomcat 5.5 and Tomcat 6.0.