Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "exception?" Watch "exception?" New topic


raymond yadao
Ranch Hand

Joined: Jan 29, 2001
Posts: 88
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= ...>
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?
I agree. Here's the link:
subject: exception?
It's not a secret anymore!