page redirection problem via Bean in Js1.1

Posted by johnbritto on Stack Overflow See other posts from Stack Overflow or by johnbritto
Published on 2010-04-13T11:25:15Z Indexed on 2010/04/13 12:03 UTC
Read the original article Hit count: 261

Filed under:

I have a requested scoped managed bean, called AuthenticationBean. I am developing a smal application with a login module, user activation and deactivation.

When I click on the activate or deactivate link, then the action is processed in AuthenticationBean. I want thereafter redirect to some page depending on the activate or deactivate link.

I have tried the following in the bean constructor:

FacesContext.getCurrentInstance().getExternalContext().redirect("/user/activate.jsp");

But this code is not working. Please help me.

© Stack Overflow or respective owner

Related posts about jsf