how to disable tomcat caching? I use this -
<Context antiJARLocking="true" antiResourceLocking="true" cachingAllowed="false" cacheMaxSize ="0" cacheTTL="1">
in Tomcat/conf/context.xml
but it not helps
Actual problem is antiResourceLocking="true"
.
Looks like there is a conflict with cachingAllowed="false"
.
I'm not sure what you're using, but in context.xml you can change the value of cachingAllowed
by removing the flag.
Remember to delete the cache folder after that.
Resources :
On the same topic :
cachingAllowed did not help. I resolved this by modifying :
$CATALINA_HOME/conf/Catalina/localhost/thewebapp.xml
which is the cached file of context.xml
Put below code in your sever.xml file.
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="false"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true"
reloadable="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
Make sure to delete all data from /work/Catalina/localhost directory before restarting tomcat. Also clear your browser cache.
Its a good practice to disable browser caching while your app is in development. This post may help Disabling Chrome cache for website development
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.