Re: Log out problem

Gareth Jones <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
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"

>Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology."

>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!

>Tax Center - forms, calculators, tips, and more

>

----------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.