tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Padhu Vinirs <>
Subject Re: How to catch the thrown Exception
Date Wed, 09 Oct 2002 20:12:21 GMT

If the exception is thrown from a Servlet, then catch the Exception, 
wrap it with a ServletException, throw this. Then you can retrieve the 
exception from attribute  javax.servlet.error.exception, and get the 
root cause exception.

yourException = 

-- padhu

Nagpal, Vikas wrote:

>Hello Everybody,
>I have been trying to catch the thrown exception and print it on my JSP
>page. As I catch the exception and print it using System.out.println command
>it displays NULL. But I want to print the number which threw the exception
>not NULL. Can anyone tell me how to catch this number and print it on my JSP
>Vikas nagpal.
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

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

View raw message