For Tomcat 8 / Tomcat 9 properties should be added in conf/context.xml as follows
<Context>
<Resources antiResourceLocking="false" cachingAllowed="false" />
...
</Context>
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):
Mac: /Users/{:user}/Library/Caches/IntelliJIdea{:version}/tomcat/
Linux: /home/{:user}/.IntelliJIdea{:version}/system/tomcat/
Windows: C:\Users\{:user}\.IntelliJIdea{:version}\system\tomcat\
See Apache Tomcat 9 Configuration Reference for other parameters.