title: Case-sensitivity issue with Tomcat 8 Resources / PreResources
body: <p>For starters, we are running Tomcat8, Java8, and Windows Server 2012.</p>
  
  <p>We store images, styles, JavaScript, and other static resources in directories outside of our web application called "shared" and "uploads". To configure this, I create a base context that all apps that looks like this:</p>
  
  <pre><code>&lt;Context&gt;
      &lt;Resources&gt;
          &lt;PreResources base="${document.root}\shared" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/shared" /&gt;
          &lt;PreResources base="${document.root}\uploads" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/uploads" /&gt;
      &lt;/Resources&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>And in addition, there is a site specific context that would look like this:</p>
  
  <pre><code>&lt;Context docBase="${document.root}\sitename"&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>We were noticing that some requests to the shared directory were working and others were not. I figured out that it has to do with the file name casing.  Some files within shared have names that start with lower case letters and some with upper case. Those that have lower case names work fine. So to test a theory, I made two requests to the same file name (one that does not exist), changing only the casing, so I could see the 404 page and see the file path actually being used.  </p>
  
  <p>I first requested this URL:</p>
  
  <pre><code>{domain}/shared/Base.js
  </code></pre>
  
  <p>The resulting 404 page indicates that Tomcat searched for this path: </p>
  
  <pre><code>/shared/base.js
  </code></pre>
  
  <p>I then requested this URL:</p>
  
  <pre><code>{domain}/shared/base.js
  </code></pre>
  
  <p>The resulting 404 page indicates that Tomcat searched for this path: </p>
  
  <pre><code>/shared/base.js
  </code></pre>
  
  <p>As you can see, no matter what casing I use in the URL, it seems to convert it to lower case. So if I go and rename one of the files that is failing to an all lower case name, everything works. The problem is these are large directories and we are aiming to upgrade our server without a coinciding code update. Also, the content in uploads is submitted by our users and outside of ensuring unique names, we do not alter the file names so casing will continue to be random. Is anyone aware of some attribute or configuration I can use to get Tomcat to use the file name exactly as it is provided in the URL?</p>