You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rodrigo Avila <rd...@gmail.com> on 2005/04/27 18:12:51 UTC

set header in all responses

Hi all!

Is possible to put this headers in all responses generated by Tomcat?

response.setHeader("Pragma","no-cache"); response.setHeader
("Cache-Control","no-history");
response.setDateHeader("Expires",-1); 

Thanks the attetion.
 
-- 
Rodrigo de Avila
rdeavila@gmail.com

http://www.avila.eti.br

Re: set header in all responses

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Filters:
http://java.sun.com/products/servlet/Filters.html

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Rodrigo Avila wrote:
> right... I need to all apps in an TC instance use these headers... how
> I do it? I don't know how use filters / valves...
> 
> Thanks!
> 
> 
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: set header in all responses

Posted by Rodrigo Avila <rd...@gmail.com>.
right... I need to all apps in an TC instance use these headers... how
I do it? I don't know how use filters / valves...

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: set header in all responses

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
A filter is an ideal solution for this... It has the benefit of being 
app-specific, so should you ever want to host another app in the same TC 
instance that doesn't require those headers, they won't be set 
automatically (i.e., at the server-level).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Rodrigo Avila wrote:
> Hi all!
> 
> Is possible to put this headers in all responses generated by Tomcat?
> 
> response.setHeader("Pragma","no-cache"); response.setHeader
> ("Cache-Control","no-history");
> response.setDateHeader("Expires",-1); 
> 
> Thanks the attetion.
>  




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org