permaculture playing cards*
The moose likes Struts and the fly likes exception? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "exception?" Watch "exception?" New topic
Author

exception?

raymond yadao
Ranch Hand

Joined: Jan 29, 2001
Posts: 88
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception?
 
Similar Threads
Struts Validator Plug-In
jsp access exception
form bean doesn't come into picture
How to transport the stacktrace of an Exception from a Action to a Error-JSP?
problem getting data from form bean