Re: how to invalidate a user session properly?

2010-05-12 Thread Hassan Schroeder
On Wed, May 12, 2010 at 12:24 AM, Yucca Nel  wrote:
> Currently I need to fire my jsf command button twice

Bummer. But wouldn't it be better to find a JSF list to ask all these
JSF-specific questions on?

Because they apparently have nothing to do with Tomcat :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



how to invalidate a user session properly?

2010-05-12 Thread Yucca Nel
Currently I need to fire my jsf command button twice to get the logic behind it 
to invalidate the session correctly as follows:
 public String logout(ActionEvent ae) throws IOException, ServletException {
HttpServletRequest req= (HttpServletRequest) 
FacesContext.getCurrentInstance().getExternalContext().getRequest();
req.getSession(false).invalidate();

return "home";

the backing bean is request scope and I though that that may have been the 
issues. I would like to add that simply changing the mthod to one for a simple 
action and not actionListener makes no difference.

Here is where the button is called...



tomcat 6 being used.