way to extend JSPs or config for no-cache?

T

Tom

Hi,

I would like all my JSPs to have headers attached to prevent them from
being cached. What I want to avoid is having to add:

<%
response.setHeader("Cache-Control","no-store"); // HTTP 1.1
response.setHeader("Pragma","no-cache"); // HTTP 1.0
response.setDateHeader ("Expires", 0); // prevents caching at the proxy
server
%>

to all my pages. Is there a way to override the JSP method that spits out
the HTML code to add these headers, or is there some sort of config file I
can edit? I'm using tomcat 4 with Struts 1.1. I've used the "nocache"
parameter of the controller module and that works great for anything that
Struts spits out, but of course it doesn't affect any JSP pages since tomcat
is handling that.

Thanks,

-Tomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top