Tomcat can't see newly created static files and is server-side caching the old files

后端 未结 3 955
走了就别回头了
走了就别回头了 2021-01-13 08:47

I use Tomcat 7 on Windows XP.

  • I have a directory with static files (HTML, CSS, JS) in %TOMCATDIR%/webapps/myapplication.
  • They\'re accessi
相关标签:
3条回答
  • 2021-01-13 08:53

    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.

    0 讨论(0)
  • 2021-01-13 09:02

    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>
    
    0 讨论(0)
  • 2021-01-13 09:05

    Tomcat 8 - disable caching of static resources:

    context.xml

         <Resources cachingAllowed="false"/>
    
    0 讨论(0)
提交回复
热议问题