Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception?

 
raymond yadao
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I'm developing a web application using struts framework.I made a centralized error page, any exceptions that may occurred will be directed to this error page.In my error page im using the <html:errors property="ERRORS"/> to display the errors.In my action class there's a try-catch to caught the exception.
try {
.....
} catch (Exception e) {
ActionErrors errors = new ActionErrors();
errors.add("ERRORS", new ActionError("errors.100"));
saveErrors(request, errors);
request.setAttribute("GLOBAL_ERROR", e.getMessage());
throw me;
}
and added the exception attribute in my action mappings
<action --
<exception handler= ...>
</action>
here's my problem, when i run this and an exception occur in my error page
it displays nothing.But when i try to move out the code in the catch clause,
the error displays.Am i missing something? Is the request also forwarded when you throw exceptions in your action class?
thanks.
raymond
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic