• Post Reply Bookmark Topic Watch Topic
  • New Topic

invalidate a session

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please Say How to invalidate a session when the user refreshes the page
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do this?

Refresh means making the same request again. So you want to invalidate the user session on requesting the same thing again.
 
stan ioffe
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to remove the session or clear what's part of the session?
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IS THERE A WAY THAT WE CAN REMOVE THE PART OF THE SESSION...
u mean removing the some specified attribute from session or invalidating the session it self....
 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the advantage of being able to view your code.

Assuming many things, if your session had a check isNew(), for example
HttpSession session = request.getSession();
session.isNew();

then you could build the logic here. Read the api for more info.

I haven't tested the refresh features of web browsers, and so this will be fun for you when you test all of this.

Good luck!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!