Hi all,
 
Is there a standard way to handle all unknown exceptions in 
Struts?
 
For example in my Action classes I normally 
Catch specific exceptions and forward to specific error pages.
 
But for all other exceptions should I just forward to a global 
Errors page?
 
Eg:
 
In my struts action
 
 
public class MyAction extends BaseAction
{
    //~ Methods
----------------------------------------------------------------
 
    protected ActionForward doExecute( ActionMapping       mapping,
                                       ActionForm          form,
                                       HttpServletRequest  request,
                                       HttpServletResponse response )
    {        
      // do stuff
 
      catch(SpecificException se){
            forward to specific error page
}
 
      catch(Exception e){
            forward to global error page
}
 
    }
}
 
Is this how it generally works?
 
Cheers,
Brian
 

Reply via email to