Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application running on Tomcat 6, that (from Tomcat perspective) doesn't have any authentication. Also, it needs to run over SSL. Last, one of the pages allows you to save an Excel file. Saving file fails with an error described here: Pragma No-Cache prevents the file from being saved, and then browser complains about connection lost. This happens on IE 7 and 8; doesn't happen in Firefox or IE 9 (unfortunately most of the users have IE7).

Tomcat has attributes disableProxyCaching and securePagesWithPragma that work around caching issues in some browsers however, these are attributes for various authenticator valves.

My question is, how can I prevent Tomcat from adding a Pragma: no-cache header when there is SSL, but no authentication?

EDIT: I tried nonloginauthenticator valve - but it doesn't seem to make any difference, and I don't see it in Tomcat 6 configuration administration anyway (although I see it in APIs)

share|improve this question
up vote 1 down vote accepted

It turns out that no-cache was added by F5 load balancer. Once networking guys put an iRule to not do it - the problem went away. Tomcat was not adding anything inappropriate.

share|improve this answer

Shouldn't adding it to the SSLAuthenticator valve work?

share|improve this answer
tried it... nope :( in fact, I tired all 4: Basic, Forms, SSL and NonLogin – Felix Dec 15 '11 at 5:11

I had same problem, and solved it adding this

 <Valve className="org.apache.catalina.authenticator.SSLAuthenticator" securePagesWithPragma="false"/>
 <Valve className="org.apache.catalina.authenticator.NonLoginAuthenticator" securePagesWithPragma="false"/>

in CATALINA_HOME/conf/context.xml.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.