tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Fonville" <serge.fonvi...@gmail.com>
Subject Re: Custom Error Messages (5xx and 4xx)
Date Mon, 03 Nov 2008 21:44:26 GMT
Hi,

Look at http://java.sun.com/developer/EJTechTips/2003/tt0114.html,
especially the text
The string isErrorPage="true" causes the Web container to define a new
implicit variable, "exception", that the JSP page can use in scriptlets or
in custom tags. For example, the error page for the current example uses the
"exception" object to report the name of the class that caused the
exception:
Basically when at the top of the jsp you specify isErrorPage=true, you have
a variable exception that contains the thrown exception

Hope this helps

Regards,

Serge Fonville
On Mon, Nov 3, 2008 at 10:31 PM, Rob Mercer <r.mercer@magnushealth.com>wrote:

> Hey all,
>
>                I'm trying to setup custom error messages in Tomcat
> 6.0.14. I've got the following entry in web.xml:
>
>
>
> <!-- Error configuration  -->
>
>      <error-page>
>
>            <error-code>404</error-code>
>
>            <location>/error_pages/404.jsf</location>
>
>      </error-page>
>
>
>
>      <error-page>
>
>            <error-code>500</error-code>
>
>            <location>/error_pages/500.jsf</location>
>
>      </error-page>
>
> ....
>
>
>
> And I've got a much less scary set of pages setup but I was wondering if
> there was a way to get the stack trace and error message information to
> shoot to the support team if the user clicked an "email the support team
> about this error message."  Any ideas on how I'd go about that?
>
>
>
> Additionally, is there a way to setup a 5xx page? Just a page that
> handled all 500 pages? Like a web.xml shorthand?
>
>
>
>
>
> Thanks ahead of time!
>
>
>
> Rob M
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message