You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by John <jo...@jak.com> on 2006/07/14 20:21:52 UTC

How to change/add/prepend HTTP headers to GET response?

I've tried a filter, I've tried inserting themusing:
 
<jsp:scriptlet>
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setHeader("Cache-Control","no-store, no-cache,
must-revalidate"); //HTTP 1.1
response.setDateHeader("Expires", 0); //prevents caching at the proxy
server
response.addHeader("Cache-Control", "private, no-store, max-stale=0");
// HTTP 1.1
response.addHeader("Cache-Control", "post-check=0, pre-check=0"); //
HTTP 1.1
 
</jsp:scriptlet>
 
 
Nothing seems to work, I just get the: 
 
get /emp/faces/login.jsp HTTP/1.1t
Host: localhost
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Cache-Control: no-cache
Set-Cookie: JSESSIONID=F1DA585D5887E67D83948BD02D24EF5D; Path=/emp
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/html;charset=UTF-8
Content-Language: en
Content-Length: 7893