Tim Funk wrote:
In the use case of a servlet or filter throwing an ServletException, StandardWrapperValve will log the exception to its logger.
If the error is an expected one (such as session timeout or browser compatibility check) and there is a configured error-page directive to handle the exception, StandardWrapperValve stills logs the message. This causes many useless stack traces in the logs for error handling that is already caught.
Does it make sense to remove the log() statement? The the job of logging the exception belongs to either ErrorReportValve(?) or the user defined error handler?
Just to be clear, this is only the log() in the catch (ServletException e) code that I wish to remove.
It's a bit more complex than that. (ex: with the request dispatcher, which also logs everything)
Since this is an uncaught exception, I would log it, personally.
An IOException which occurs on a socket operation should now be ignored, however. That was the biggest offender.
Remy
Doh! I thought it wasn't that simple. But the exception is "caught" (loosely speaking) by the error-page directives as defined in web.xml. It is my preference that it would be the job of the handler as user declared by "error-page" in web.xml to choose to log the exception. If no erroe-page directive is defined, than the existing logic is OK.
But such logic might hurt a lot of users at this point due to not having things logged as they were before. So I'm content to do nothing or wait for a future major release. (like 4.2, or 5.2 if they are ever proposed)
-Tim
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]