You will need to set the appropriate HTTP header attributes to prevent the dynamic 
content output by the JSP page from being cached by the browser. 

Just execute the following scriptlet at the beginning of your JSP pages to prevent 
them from being cached at the browser. You need both the statements to take care of 
some of the older browser versions. 

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

If the above fails, try changing the first line to 

response.setHeader("Cache-Control","no-store"); //HTTP 1.1

-----Original Message-----
From: Saket Barve [mailto:[EMAIL PROTECTED]
Sent: Jueves, 13 de Marzo de 2003 04:31 p.m.
To: [EMAIL PROTECTED]
Subject: JSP page refresh option


Is there any way for me to have my page refreshed
everytime it is opened on the browser?

I am working on a database backed web project, with
JSP as front end and Oracle, JDBC as the back end.
When I have a particular user "logout" of the system,
it is noticed that simply by hitting the "back" button
on the web browser, one is able to view and act upon
the previous pages.

session.invalidate is already implemented. I need a
way to refresh the page.

I'd appreciate any feedback at the earliest.

Thanks,
Saket




__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to