As Victor says you could stop the jsp from being cached especially if the jsp performs some process which you dont want to accidentally repeat. But also the JSP will create a new session by default unless you specify otherwise. You can check for a new session (session.isNew()) or alternatively set the jsp not to create a session (<%@ page session="false"%>) then check that a session exists.
>From: "Leung, Victor" <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology." <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Log out problem >Date: Wed, 5 Mar 2003 17:32:48 -0500 > >any chance you are reading from cache when you click on the back button? >Also, make sure you put no-cache or no-store in the headers. > >-----Original Message----- >From: Aasim [mailto:[EMAIL PROTECTED] >Sent: Wednesday, March 05, 2003 5:19 PM >To: [EMAIL PROTECTED] >Subject: Log out problem > > > >Dear Servlet-Interest users, > > >I have an online ordering application and I am having problems logging out. >Once a user has placed an order and he clicks on the Logoff button, I call a >servlet where I destroy the session and redirect the user to a new page with >the message that he has logged out successfully. But, when I hit the back >button on the browser, it again takes me to the previous page. I want the >user to go to the login page when he hits the back button on the browser and >force him to login again to access any of the pages, instead of the previous >page in his session. > > >How can I achieve this functionality? >Thanks for any help in advance! > >Sincerely, > > >--Andy. > > > > > > > > > > _____ > >Do you Yahoo!? >Yahoo!Stay in touch with absent friends. Download MSN Messenger for FREE! ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
