[Webwork-user] Session map remove()
Brought to you by:
baldree,
rickardoberg
From: Maurice C . P. <Ma...@Vi...> - 2000-12-03 18:59:25
|
Rickard, I needed to be able to remove session variables to do logouts. This is my modification to Dispatcher to get it done: Index: Dispatcher.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/servlets/Dispatcher.java,v retrieving revision 1.3 diff -u -r1.3 Dispatcher.java --- Dispatcher.java 2000/11/30 12:38:45 1.3 +++ Dispatcher.java 2000/12/03 18:53:49 @@ -357,5 +357,12 @@ session.setAttribute(key.toString(), value); return get(key); } + + public Object remove(Object key) + { + Object value = get(key); + session.removeAttribute(key.toString()); + return value; + } } } Could you please add this to Dispatcher (or some similar functionality) so that session variables can be cleared? Thanks, Maurice |