Reputation: 41338
I use Tomcat 7 on Windows XP.
%TOMCATDIR%/webapps/myapplication
.localhost:8080/myapplication
When a change happens to a file in my server dir, it is not reflected:
The above happens no matter how many times I try to reload the file, or even add query string to it (img.jpg?timestamp=...
).
In %TOMCATDIR%/conf/context.xml
I've set various directives to disable server-side caching:
<?xml version='1.0' encoding='utf-8'?>
<Context antiResourceLocking="true" cachingAllowed="false" cacheMaxSize="1" cacheTTL="1">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
What is wrong?
Upvotes: 5
Views: 15974
Reputation: 31
Finally the solution is to replace %TOMCATDIR%/conf/context.xml file content within :
<?xml version='1.0' encoding='utf-8'?>
<Context cachingAllowed="false" cacheMaxSize="1" cacheTTL="1">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
Upvotes: 0
Reputation: 410
Tomcat 8 - disable caching of static resources:
context.xml
<Resources cachingAllowed="false"/>
Upvotes: 0
Reputation: 41338
The solution seems to be remove antiResourceLocking="true"
.
If anyone's more knowledgable about the topic, or know how to workaround it other way, I'll be grateful.
Upvotes: 2