set header in all responses

2005-04-27 Thread Rodrigo Avila
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
[EMAIL PROTECTED]

http://www.avila.eti.br


RE: set header in all responses

2005-04-27 Thread Peter Crowther
 From: Rodrigo Avila [mailto:[EMAIL PROTECTED] 
 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); 

Yes.  At worst, you could write a Valve that set those fields before
invoking the next valve in the chain, and put it into your server.xml.
There may well be more elegant solutions.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: set header in all responses

2005-04-27 Thread Frank W. Zammetti
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: set header in all responses

2005-04-27 Thread Robert r. Sanders
I'd use a servlet filter; but either way it should work.
Peter Crowther wrote:
From: Rodrigo Avila [mailto:[EMAIL PROTECTED] 
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); 
   

Yes.  At worst, you could write a Valve that set those fields before
invoking the next valve in the chain, and put it into your server.xml.
There may well be more elegant solutions.
- Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: set header in all responses

2005-04-27 Thread Rodrigo Avila
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: set header in all responses

2005-04-27 Thread Frank W. Zammetti
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]