title: Unable to add Expires or Cache-Control response headers for JavaScript files via ExpiresFilter
body: <p>I have a website running on Tomcat 8.0.36 on Windows. I followed this link</p>
  
  <p><a href="https://tomcat.apache.org/tomcat-8.0-doc/config/filter.html" rel="nofollow noreferrer">https://tomcat.apache.org/tomcat-8.0-doc/config/filter.html</a></p>
  
  <p>to add Expires and Cache-Control response headers. Here is what I did:</p>
  
  <pre><code>&lt;filter&gt;
   &lt;filter-name&gt;ExpiresFilter&lt;/filter-name&gt;
   &lt;filter-class&gt;org.apache.catalina.filters.ExpiresFilter&lt;/filter-class&gt;
   &lt;init-param&gt;
      &lt;param-name&gt;ExpiresByType image&lt;/param-name&gt;
      &lt;param-value&gt;access plus 10 minutes&lt;/param-value&gt;
   &lt;/init-param&gt;
   &lt;init-param&gt;
      &lt;param-name&gt;ExpiresByType text/css&lt;/param-name&gt;
      &lt;param-value&gt;access plus 10 minutes&lt;/param-value&gt;
   &lt;/init-param&gt;
   &lt;init-param&gt;
      &lt;param-name&gt;ExpiresByType application/javascript&lt;/param-name&gt;
      &lt;param-value&gt;access plus 10 minutes&lt;/param-value&gt;
   &lt;/init-param&gt;
  &lt;/filter&gt;
  ...
  &lt;filter-mapping&gt;
   &lt;filter-name&gt;ExpiresFilter&lt;/filter-name&gt;
   &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
   &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>After adding the above in web.xml, I am able to see Expires and Cache-Control response headers for css files. However, I am not able to see such response headers for Javascript files.</p>
  
  <p>Anything I did is wrong or missing?</p>