You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Preston CRAWFORD <Pr...@state.or.us> on 2005/10/07 20:09:29 UTC

More questions on exception handling

Once again a question about best practices. So I setup an error page,
referenced in struts-config.xml that shows the error. My problem is
this. 

#1 - I want to log the error and print out to the console in addition
to going to the error page. This isn't happening. Does this mean that I
need to override the Struts ExceptionHandler in order to explicitly make
sure that before the error page gets the exception, that it's logged,
printed to the console, then passed on?

#2 - There are some 500 errors, obviously, that aren't struts-related.
If I put an error page handler in the web.xml the exception is swallowed
and the page doesn't print out the error the same way. The stack trace
doesn't go back to the root of the problem or doesn't seem to. So how do
I handle 500 exceptions at the container level without ruining my
struts-level exception handling? Or should they just never make it to
the container if I'm doing it right?

Preston

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org