tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadav Katz <>
Subject RE: JSP Exception object arriving null at error handler
Date Sun, 11 Sep 2011 11:06:09 GMT
Hi Bob, 
Thanks for the quick reply. Is there anywhere where I can find documentation for this? I'm
asking because I came across this behavior by chance when I got a NullPointerException in
logging code calling exception.getMessage().
Is it possible that I will come across this with other types of exceptions? Is my logging
code unusable?
-----Original Message-----
From: Bob Hall [] 
Sent: Sunday, September 11, 2011 12:54 PM
To: Tomcat Users List
Subject: Re: JSP Exception object arriving null at error handler

From: Nadav Katz <>
To: Tomcat Users List <>
Sent: Sunday, September 11, 2011 2:11 AM
Subject: JSP Exception object arriving null at error handler


I seem to be having a problem with the exception object attribute arriving null at the error
handeling jsp. 

Since I encountered this error in production, I recreated on a small project.

This is the web.xml error page entry: 






This is notFoundError.jsp:

<%@ page isErrorPage="true" %>

<%@ page isELIgnored="false"%>



        if(exception != null)


                System.out.println("Exception is not Null, it's " + exception.toString());




is Null!!");



What am I doing wrong? 



There is no Exception in this case.

This example should work for you _and_ allow you to display the resource that was not found:

- Bob

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

View raw message