Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session variables

 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know how to invalidate a session. What to do if I just want to kill one session variable instead of the whole session?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a handy removeAttribute( name ) method
If you are working with an earlier version of the API, that method might not exist so alternately you can replace it - use session.putValue with the same name and something like an empty String. Note that putValue is replaced by setAttribute in API 2.2
Bill

------------------
author of:
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. It works.
It is used in one of my servlet application. You can go to
http://www.webappcabaret.com/justtalk/servlet/smallcon.justtalk.userlogin
to have a look at the chatroom application.
Comments welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic