recreating a session - if that's the word for it
Hello,
At the moment I am usingsetBean("SessionBean1", new SessionBean1()); to recreate everything in the session bean. However, other parts of the users session (probably not the right word) remain. For instance, which tabs and tree nodes they have selected. Is there a way to recreateeverything for the user?
p.s. if you're interested, this is for a logout.
thanks,
Tristan
[423 byte] By [
apersona] at [2007-11-26 14:53:53]

# 2
Probably isn't the answer you were looking for... But hope it will be usefull....
For logof, no need to recreate the SessionBean, u can just call the
session.invalidate () method and redirect to ur login page as follows..
this.getExternalContext().redirect ("Login.jsp")
Hope this helps
# 3
Thanks shafeeq. I think that pointed me in the right direction. Now I'm using: javax.servlet.http.HttpSession session = (javax.servlet.http.HttpSession) getExternalContext().getSession(false);
session.invalidate();
Unfortunately it still doesn't do the trick. I'm inclined to say it's the right code and it's just broken, but in the past I've been a firm believer in "never blame the environment/compiler". Then again, JSC is challenging that.
It's certainly a session issue since closing and opening the browser fixes it.
# 4
Hi,
By simply closing the session the users current screen will not go..... U have to explicitely redirect the user to the login screen.....
There also some problem is there... user can c the screen with the help of the back button of the browser, but any server call can be prevented using the PhaseListener, which will check for some session variables..
Hope this is helpfull