You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tomas Pop <po...@master.cz> on 2007/02/12 14:40:08 UTC
how to change Tomcat default headers
Hello,
I have this problem:
Tomcat adds (or at least did in the 4.1 branch) certain response
headers, directives to clients and proxy caches to not cache the data,
when it is to serve something within a security-constraint.
[It seems that] When IE downloads something with a mime-type it thinks
it can handle (probably via a plug-in) it caches the data and then
passes it over to the plug-in. With SSL and the Pragma header set to
no-cache this seems to fail.
Problems are with these headers in IE:
Pragma = No-cache
Cache-Control = No-cache
I can change it in action in this way:
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "max-age=0");
This works fine. But how can I set these headers not in my action, but
for Tomcat default servlet? For example, when I want to view DOC file
with mime-type "application/msword", I click on the file and it's
processed by Tomcat default servlet and there are bad headers for IE.
Thanks.
--
Mgr. Tomas Pop
Master Internet s.r.o.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: how to change Tomcat default headers
Posted by Gregor Schneider <rc...@googlemail.com>.
we switched to apache httpd to serve static content and thus avoided
the problem, tomcat behind is only serving dynamic content.
before we did this, we've created a filter for the specific webapps
that needed the headers to be changed, however, you'll have to do that
for each webapp where you want headers other than tomcat's default
headers.
cheers
greg
--
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org