webtier@glassfish.java.net

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

From: <webtier_at_javadesktop.org>
Date: Sat, 03 Apr 2010 01:30:46 PDT

You can try to redirect manually, like this:

public String testAction()
{
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
ec.invalidateSession();
ec.redirect("login.xhtml"); // Or whatever servlet mapping you use
// redirect() invokes FacesContext.responseComplete() for you

return null;
}
[Message sent by forum member 'jkva']

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