Does anybody know how to go about redirecting to an error
page from the constructor of a backing bean.
 
For example:
 
class BBean
{
     Data someData;
    
     public BBean ()
     {
           try
           {
            someData = getData();
           }
           catch(Throwable t)
           {
            // What is the code here to redirect to an error page ?
           }
     }
    
     ....
}
 
I tried using FacesContext.getCurrentInstance().getExternalContext().dispatch("error.jsp");
but I got a response already rendered error.
 
Thanks
 
Mark

Reply via email to