Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to terminate a session?

800332Oct 7 2004 — edited Oct 7 2004
Hi guys,

I wanna terminate a session when user has signed out. I use the code below but then I go to Tomcat manager to check the session, it's still there.

public String logoutAction() {

FacesContext context = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
session.invalidate();
return PageNavigator.HOME;

}

Pls help ! Thanks !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2004
Added on Oct 7 2004
3 comments
125 views