Alex,

Put this code at the top of every JSP page that you want to refresh each
time it loads.  I don't understand it, but it works!  Personally, I put it
at the top of every page just for the hell of it.

<% // This JSP scriptlet will prevent troublesome page-caching
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", -1); //prevents caching at the proxy
%>


Regards.

Lindsay


Lindsay Hamoudi
Web Application Developer
BTexaCT Technologies

e-mail: [EMAIL PROTECTED]
tel: (+44) (0)1473 605892
mobile: (+44) (0)7985 114296
 
Orion Building (B62-MH), PostPoint 12, Adastral Park, Martlesham, Ipswich
IP5 3RE, UK


BTexact Technologies is a trademark of British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ 
Registered in England no. 1800000 
This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.



 -----Original Message-----
From:   Alex Ruiz [mailto:[EMAIL PROTECTED]] 
Sent:   15 August 2002 22:13
To:     mvc-programmers
Subject:        [MVC-Programmers] Refreshing pages

Hi everyone!

I'm using Struts 1.0 for an internal Web App in my company.  I don't know
how I can always refresh a JSP page.  I don't want the users to see cached
pages (when they click the "back" button or when they are working offline).
Is there any way to do this?  Please help me.

Thank you in advance,
Alex.

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers
_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers

Reply via email to