I have an action class with an execute method as follows
public ActionForward execute( ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res
)
throws Exception
{
try
{
Do something innocuous;
Foo foo = new FooWhichThrowsAnExceptionInConstructor();
}
catch (Exception e)
{
mapping.findForward("goto_graceful_error_page");
}
}
But instead of going to the graceful error page the user gets the HTTP
Status 500 - page and I see the following in the error log.
org.apache.struts.action.RequestProcessor - Unhandled Exception thrown:
class java.lang.Exception
I put debug println's around the code and found that execution stopped
immediately at the call to the foo constructor, and the catch block was
never entered.
I am not doing anything outside of the try block. Is this behaviour
standard in struts? Shouldn't I be going to my graceful error page?
Can anyone shed any light on this?
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]