This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes Login problem using browsers back button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Login problem using browsers back button" Watch "Login problem using browsers back button" New topic
Author

Login problem using browsers back button

Manisha Patil
Greenhorn

Joined: Apr 27, 2011
Posts: 2
Hi All,

1. Enter application url in browser, login page is displayed.
2. Login using user1.
3. Check the logged in username, it is of user1.
4. Click Browser back button to go back to the login screen. (don't log out user1)
5. Login using user2.
6. Check the logged in username, it is of user1.
It should be of user2.

Could you please help me in this?
Thanks a lot!!
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

so what is the problem which you are facing ? paste some code... clicking on back doesn't do anything... if you have a submit button in your login jsp then it should be submitted with the new user name which you entered, in this case 'user2'.

paste your servlet / jsp.. using code tags.


Time is what we want the most, but what we use the worst. -- William Penn
H Light
Greenhorn

Joined: May 16, 2011
Posts: 8
how do you save user,by session or cookie?

you should paste your code
Manisha Patil
Greenhorn

Joined: Apr 27, 2011
Posts: 2
In the login_try method, the userAuth object is retrieved using session. And the same session id is used for User2.

HttpSession session = request.getSession(true);
UserAuth userAuth = Login.getUserAuth(session.getId());
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Login problem using browsers back button
 
Similar Threads
pressing back button after logout shows loggedin contents
problem without logout, how to solve it
How can I make an application with n no. of sessions for n no. of browser?
How to identify host uniquely when a firewall is enabled?
Roles of a user