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?