You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guy Rouillier <gu...@speakeasy.net> on 2002/12/24 20:20:56 UTC

NullPointerException on exception in ErrorPage.jsp

I've been notified of a really weird exception.  I've searched the archives to no avail.  I provide the actual code at the bottom of this message.  In summary, some error on our web site is causing invocation of the designated JSP error page.  The error page is apparently getting a NullPointerException on the implicit exception object.  How is it possible to get to the error page with a null exception object?  My understanding is that the only time the error page gets invoked is if some unhandled exception occurs on a non-error page.  So I can't understand how the exception can be null on the error page.  By the way, this same error page has successfully reported errors on numerous occasions in the past; this is the first time I've received a report of a failure on the error page itself.

Here is the reported exception (cut down for readability) and the source (located on the translated .java file, but shown from errorpage.jsp):

java.lang.NullPointerException
at common.html._0002fcommon_0002fhtml_0002ferrorpage_0002ejsperrorpage_jsp_0._jspService(_0002fcommon_0002fhtml_0002ferrorpage_0002ejsperrorpage_jsp_0.java:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

<%
exception.printStackTrace(new PrintWriter(out));
%>

Re: NullPointerException on exception in ErrorPage.jsp

Posted by Guy Rouillier <gu...@speakeasy.net>.
I figured this one out.  Somebody had coded a sendRedirect("errorpage.jsp").
Sorry for the noise.

----- Original Message -----
From: "Guy Rouillier" <gu...@speakeasy.net>
To: "Tomcat User" <to...@jakarta.apache.org>
Sent: Tuesday, December 24, 2002 2:20 PM
Subject: NullPointerException on exception in ErrorPage.jsp


I've been notified of a really weird exception.  I've searched the archives
to no avail.  I provide the actual code at the bottom of this message.  In
summary, some error on our web site is causing invocation of the designated
JSP error page.  The error page is apparently getting a NullPointerException
on the implicit exception object.  How is it possible to get to the error
page with a null exception object?  My understanding is that the only time
the error page gets invoked is if some unhandled exception occurs on a
non-error page.  So I can't understand how the exception can be null on the
error page.  By the way, this same error page has successfully reported
errors on numerous occasions in the past; this is the first time I've
received a report of a failure on the error page itself.

Here is the reported exception (cut down for readability) and the source
(located on the translated .java file, but shown from errorpage.jsp):

java.lang.NullPointerException
at
common.html._0002fcommon_0002fhtml_0002ferrorpage_0002ejsperrorpage_jsp_0._j
spService(_0002fcommon_0002fhtml_0002ferrorpage_0002ejsperrorpage_jsp_0.java
:75)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

<%
exception.printStackTrace(new PrintWriter(out));
%>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>