• Post Reply Bookmark Topic Watch Topic
  • New Topic

Login problem using browsers back button

 
Manisha Patil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
H Light
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you save user,by session or cookie?

you should paste your code
 
Manisha Patil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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());
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!