tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Tomcat and checked vs. unchecked exceptions
Date Fri, 20 Feb 2004 17:06:39 GMT


>Apparently it changes a checked exception into an unchecked one. I'm
>sure what that means to me, except that try as I might, I can't catch
>this in Tomcat and present a nice error page:
>   <error-page>
>      <exception-type>javax.servlet.ServletException</exception-type>
>      <location>/exceptions/Exception.jsp</location>
>   </error-page>
>   <error-page>
>      <exception-type></exception-type>
>      <location>/exceptions/Exception.jsp</location>
>   </error-page>
>   <error-page>
>      <location>/exceptions/Exception.jsp</location>
>   </error-page>

Try <exception-type>java.lang.RuntimeException</exception-type>, as
that's the superclass for unchecked exceptions and you probably want to
handle them all the same (if you want to handle them at all, which
apparently you do).

Yoav Shapira

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message