When user presses the back button of browser, and does some operation and
presses submit or other button, the request will go to server. And before
trying anything you should always check if user is in session or not, else
redirect him to the login page.
Client browser can override the attributes as described below. But you
should also use them




                    "Sanchez, Enrique
                    (CORP, DDEMESIS)"              To:     [EMAIL PROTECTED]
                    <[EMAIL PROTECTED]        cc:     (bcc: ashwani.kalra/Polaris)
                    IS.GE.COM>                     Subject:     Re: JSP page refresh 
option
                    Sent by: A mailing list
                    about Java Server Pages
                    specification and
                    reference
                    <[EMAIL PROTECTED]
                    COM>


                    03/14/2003 04:05 AM
                    Please respond to A
                    mailing list about Java
                    Server Pages
                    specification and
                    reference







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




This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

Reply via email to