Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF: Redirecting to another page before the current page load.

807605Jul 9 2007 — edited Jul 9 2007
Hello, everybody!

I'm developing a web application using JavaServer Faces and I want to be able to make a test in every page in my application when they are loading and to redirect to another page (if I think it's necessary), but I don't know where to put this test. If I was programming in ASP.NET I just would have to use the Page_Load event that. I would make my test there and redirect to another page if necessary.

How do I do this in JSF?

Thank you very much.

Marcos

Edited:

For example, in ASP.NET, I could have this code:
public partial class MyPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (PasswordNotChangedYet())
        {
            HttpContext.Current.Response.Redirect("ChangePassword.aspx");
        }
    }
}
What about JSF?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2007
Added on Jul 9 2007
0 comments
496 views