<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Tomcat</title>
        <link>http://geekswithblogs.net/paullee/category/10852.aspx</link>
        <description>Tomcat</description>
        <language>en-US</language>
        <copyright>Paul Lee</copyright>
        <managingEditor>plee.paul@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Tomcat SSL Cache - Cannot download PDF</title>
            <link>http://geekswithblogs.net/paullee/archive/2009/10/30/tomcat-ssl-cache---cannot-download-pdf.aspx</link>
            <description>&lt;p&gt;I've fixed this error so many times and have had to search the internet for the fix everytime that I've finally decided to log it into my own blog.  Mainly so I can easily find it. &lt;/p&gt;
&lt;p&gt;Here's the problem.  As a general rule, all https applications do not cache any pages for security reasons.  This leaves the issue of downloading files from a https site.  For example, if you try to download a file (pdf, xls, doc, etc) from any site, your computer will download it to cache before opening it with the associated application.  So specifically in a Tomcat ssl site, you will get this error (or something like this):&lt;/p&gt;
&lt;p&gt;&lt;img height="141" width="767" alt="" src="/images/geekswithblogs_net/paullee/IEerror.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Tomcat is automatic adding a Pragma: no-cache header to your page.  Here is the &lt;a href="http://www.symphonious.net/2007/06/19/caching-in-tomcat/"&gt;link&lt;/a&gt; with the fix.  &lt;/p&gt;
&lt;p&gt;So where ever the &amp;lt;context&amp;gt; of your web application is defined, you want to add something like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;Context&amp;gt;&lt;br /&gt;
&amp;lt;Valve className="org.apache.catalina.authenticator.BasicAuthenticator"  disableProxyCaching="false" /&amp;gt;&lt;br /&gt;
&amp;lt;/Context&amp;gt;&lt;/p&gt;
&lt;p&gt;And of course you can change BasicAuthenticator to FormAuthenticator or DigestAuthenticator depending on what you are using.  &lt;/p&gt;
&lt;p&gt;Hopes this helps someone.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/paullee/aggbug/135915.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Paul Lee</dc:creator>
            <guid>http://geekswithblogs.net/paullee/archive/2009/10/30/tomcat-ssl-cache---cannot-download-pdf.aspx</guid>
            <pubDate>Sat, 31 Oct 2009 00:57:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/paullee/comments/135915.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/paullee/archive/2009/10/30/tomcat-ssl-cache---cannot-download-pdf.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/paullee/comments/commentRss/135915.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/paullee/services/trackbacks/135915.aspx</trackback:ping>
        </item>
    </channel>
</rss>
