This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes How to control Caching in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to control Caching in JBoss" Watch "How to control Caching in JBoss" New topic
Author

How to control Caching in JBoss

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" info almost 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
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

Couldn't you just put that stuff in one jsp page that you <include> in all your jsp pages, like Header and Footer jsp pages?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to control Caching in JBoss