Geeks With Blogs
Paul Lee Sharepoint bumps and bruises

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. 

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):

Tomcat is automatic adding a Pragma: no-cache header to your page.  Here is the link with the fix. 

So where ever the <context> of your web application is defined, you want to add something like this:

<Context>
<Valve className="org.apache.catalina.authenticator.BasicAuthenticator"  disableProxyCaching="false" />
</Context>

And of course you can change BasicAuthenticator to FormAuthenticator or DigestAuthenticator depending on what you are using. 

Hopes this helps someone.

Posted on Friday, October 30, 2009 8:57 PM Tomcat | Back to top


Comments on this post: Tomcat SSL Cache - Cannot download PDF

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Paul Lee | Powered by: GeeksWithBlogs.net | Join free