I have a requested scoped managed bean, called AuthenticationBean
. I am developing a smal application wi开发者_如何学Goth 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.
have tried the following in the bean constructor:
Do not try to redirect in the bean constructor - do it in an action method.
精彩评论