You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Edoardo Causarano <ed...@gmail.com> on 2006/05/09 17:52:02 UTC

Intercepting Context exceptions

Hello list,

I'm managing some legacy web apps, some jsp and other servlet based, that
lack good Exception handling (or at least Logging and reporting). Rather
than a plain blank page I'd like to return some infomative message within
sone nice html message. Most importantly I'd like to log these exceptions in
a more suitable way than the present.

How can I implement and install an Exception trap handler to perform at
least the said logging?

Thank you very much,
e

--
Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele
e veleno.
Perdi se pensi di essere più forte.
Vinci se pensi che non c'è nessuna battaglia.
- Hans Kammerlander

Re: Intercepting Context exceptions

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
you have several options

1. implement a Valve that catches all exceptions and logs them
2. implement a filter (this will only catch within the application)
3. custom error page, and log the exception from there



Edoardo Causarano wrote:
> Hello list,
>
> I'm managing some legacy web apps, some jsp and other servlet based, that
> lack good Exception handling (or at least Logging and reporting). Rather
> than a plain blank page I'd like to return some infomative message within
> sone nice html message. Most importantly I'd like to log these 
> exceptions in
> a more suitable way than the present.
>
> How can I implement and install an Exception trap handler to perform at
> least the said logging?
>
> Thank you very much,
> e
>
> -- 
> Le montagne sono così: devi assecondarle anche se ti sputano in faccia 
> fiele
> e veleno.
> Perdi se pensi di essere più forte.
> Vinci se pensi che non c'è nessuna battaglia.
> - Hans Kammerlander


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org