title: Tomcat can't see newly created static files and is server-side caching the old files
body: <p>I use Tomcat 7 on Windows XP.</p>
  
  <ul>
  <li>I have a directory with static files (HTML, CSS, JS) in <code>%TOMCATDIR%/webapps/myapplication</code>.</li>
  <li>They're accessible via <code>localhost:8080/myapplication</code></li>
  </ul>
  
  <p>When a change happens to a file in my server dir, <strong>it is not reflected:</strong></p>
  
  <ul>
  <li>modified files are returned (200 OK) the same as previously <strong>(tested with Fiddler; for sure not a browser cache issue - cleared cache, using different browsers etc.)</strong>,</li>
  <li>newly created files in that directory are not accessible (404).</li>
  </ul>
  
  <p>The above happens no matter how many times I try to reload the file, or even add query string to it (<code>img.jpg?timestamp=...</code>).</p>
  
  <p>In <code>%TOMCATDIR%/conf/context.xml</code> I've set various directives to disable server-side caching:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;Context antiResourceLocking="true" cachingAllowed="false" cacheMaxSize="1" cacheTTL="1"&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>What is wrong?</p>