error page, message and http status

Hi,

within my web.xml I have declared an error page for http status 500.

Here is my declaration:

<error-page>

<error-code>500</error-code>

<location>/jsp/error.jsp</location>

</error-page>

Now, within the error.jsp, how can I get the exception that caused this response and print the exception message?

Thanks

[402 byte] By [ar.kaza] at [2007-11-27 0:01:48]
# 1

You can have different error pages per exception as

<error-page>

<exception-type>

com.xyz.MyException1

</exception-type>

<location>/MyException1.jsp</location>

</error-page>

or you can use the implicit object "exception" as

<%= exception.getClass().getName() %>

Regards,

Mukunt

mkunasek123a at 2007-7-11 15:53:25 > top of Java-index,Java Essentials,New To Java...