webtier@glassfish.java.net

Re: Correct way to terminate a session / JSF 2 ?

From: <webtier_at_javadesktop.org>
Date: Sun, 28 Mar 2010 03:33:23 PDT

See if my answer helps you:
1. Yes this is a correct approach to remove the session (as far as I know)
2. Once session scope has been invalidated, redirect the user:

public String testAction()
{
FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
return [b]"/login?faces-redirect=true";[/b]
}
[Message sent by forum member 'razib']

http://forums.java.net/jive/thread.jspa?messageID=394108