开发者

page redirection problem via Bean in Js1.1

开发者 https://www.devze.com 2022-12-26 10:05 出处:网络
I have a requested scoped managed bean, called AuthenticationBean. I am developing a smal application wi开发者_如何学Goth a login module, user activation and deactivation.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消