| Author |
Cache Control
|
Bunty Paul
Greenhorn
Joined: Jun 26, 2006
Posts: 28
|
|
HI, I have few jsp pages and in order control the cache i set the header info to "no-cache". It's working fine but my problem now is i am repeating this "header" in every jsp page. response.setHeader("Pragma", "no-cache"); response.setHeader("Pragma", "no-store"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Cache-Control", "no-store"); response.setDateHeader ("Expires", 0); IS there any solution so that it is specified globally or can i specify it in web.xml. Server used : jboss 4.0.3SP1 Browser : IE 6.0 Thanks, Paul
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
No but you could create either a custom tag or an include that will reduce the code to one line per page.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
You could do this with a filter too.
|
 |
 |
|
|
subject: Cache Control
|
|
|