Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the problem that you are having is that the browser is caching the PDF file, and even though there is a new file available on the server, the browser is not fetching it. In order to force the browser to fetch the latest version of the PDF file you need to set the expiration header in the HTTP response to a very short time. More information for setting this up in Tomcat can be found <a href="http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/ExpiresFilter.html" rel="nofollow">here</a>. I believe this is a feature only available since Tomcat 7. For previous versions of <code>Tomcat</code>, you need to roll your own <code>Servlet</code> that modifies the response header, which you can easily find with a bit of googling.</p> <p>To take a look at the actual HTTP response header, you can use the developer tool built into Chrome or Firebug with Firefox.</p> <p>Here's the relevant entry in web.xml that you will need:</p> <pre><code>&lt;!-- EXPIRES FILTER --&gt; &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 application/pdf&lt;/param-name&gt; &lt;param-value&gt;access plus 1 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;uploads/folder/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;/filter-mapping&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload