Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36172
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2017-01-08 15:41 -0800 |
| Message-ID | <9fc9d84a-b4a7-45a6-a47a-ab7d885bf5ce@googlegroups.com> (permalink) |
| Subject | Browser Back Button |
| From | Davej <galt_57@hotmail.com> |
I am playing with a simple login/logout scheme using a combination
of JSP and servlets, but apparently I'm not understanding the
ideal procedure to prevent odd results from the use of the browser
BACK button.
In the Login.jsp page I post a password and username to LoginServlet.
In LoginServlet I validate the password and add the member object
to the session...
request.getSession().addAttribute("member");
Then I forward to the Membership.jsp page. From Membership.jsp
I can click a logout button which posts to LogoutServlet where
I use...
request.getSession().removeAttribute("member");
request.getSession().invalidate();
...and then forward back to the Login.jsp page.
The problem is that if I immediately log out after logging in
and then use the browser BACK button the browser will resend
the username and password parameters and log me back in again.
"This document is no longer available.
The requested document is not available in Firefox’s cache.
As a security precaution, Firefox does not automatically
re-request sensitive documents.
Click Try Again to re-request the document from the website.
[Try Again]"
I guess this is just an odd little quirk, but is there perhaps
an easy way to prevent this?
Thanks.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Browser Back Button Davej <galt_57@hotmail.com> - 2017-01-08 15:41 -0800
Re: Browser Back Button Arne Vajhøj <arne@vajhoej.dk> - 2017-01-08 19:30 -0500
Re: Browser Back Button Arne Vajhøj <arne@vajhoej.dk> - 2017-01-08 20:20 -0500
Re: Browser Back Button Davej <galt_57@hotmail.com> - 2017-01-10 15:29 -0800
Re: Browser Back Button Arne Vajhøj <arne@vajhoej.dk> - 2017-01-10 19:49 -0500
Re: Browser Back Button Robert Klemme <shortcutter@googlemail.com> - 2017-01-11 19:13 +0100
Re: Browser Back Button Davej <galt_57@hotmail.com> - 2017-01-21 11:43 -0800
Re: Browser Back Button Robert Klemme <shortcutter@googlemail.com> - 2017-01-22 13:52 +0100
Re: Browser Back Button Davej <galt_57@hotmail.com> - 2017-01-22 08:34 -0800
Re: Browser Back Button Marcel Mueller <news.5.maazl@spamgourmet.org> - 2017-01-09 19:35 +0100
Re: Browser Back Button Arne Vajhøj <arne@vajhoej.dk> - 2017-01-09 19:42 -0500
Re: Browser Back Button Robert Klemme <shortcutter@googlemail.com> - 2017-01-10 08:03 +0100
Re: Browser Back Button lewbloch@gmail.com - 2017-01-10 11:30 -0800
csiph-web