R
rampaadh
Hi,
I have Tomcat 5.5 and i am having a jsp page which throws
a null pointer exception deliberately. I have defined a jsp error
handler
page, which is shown below,
ErrorHandler.jsp
================
<%@ page isErrorPage="true" %>
<%@ page session="true" %>
<html>
<body>
<b>Unable to process your request. </b>
<br/>Reason : <b><%=exception.toString()%></b>
Please try again.!
</body>
</html>
And in the first jsp page, I have given the errorPage as,
MyTemp.jsp
==========
<%@ page errorPage="ErrorHandler.jsp" %>
<html>
<body>
<%
String s = null;
s.indexOf("0"); // throw null pointer exception explicitly.
%>
</body>
</html>
When i access the MyTemp.jsp page,it is not forwarded to the error
handler jsp.
Instead,
"The page cannot be displayed " page with "HTTP 500 - Internal server
error " is displayed..
I don't know why the control is not going to the errorhandler page.
I searched for any configuration in tomcat so that all the exception
are not handled by the default tomcat error handler page.
But no luck..
One thing is , if i remove errorPage in Mytemp.jsp, tomcat displays the
exception stack in the browser itself..
Any help would solve my problem..
-pk
I have Tomcat 5.5 and i am having a jsp page which throws
a null pointer exception deliberately. I have defined a jsp error
handler
page, which is shown below,
ErrorHandler.jsp
================
<%@ page isErrorPage="true" %>
<%@ page session="true" %>
<html>
<body>
<b>Unable to process your request. </b>
<br/>Reason : <b><%=exception.toString()%></b>
Please try again.!
</body>
</html>
And in the first jsp page, I have given the errorPage as,
MyTemp.jsp
==========
<%@ page errorPage="ErrorHandler.jsp" %>
<html>
<body>
<%
String s = null;
s.indexOf("0"); // throw null pointer exception explicitly.
%>
</body>
</html>
When i access the MyTemp.jsp page,it is not forwarded to the error
handler jsp.
Instead,
"The page cannot be displayed " page with "HTTP 500 - Internal server
error " is displayed..
I don't know why the control is not going to the errorhandler page.
I searched for any configuration in tomcat so that all the exception
are not handled by the default tomcat error handler page.
But no luck..
One thing is , if i remove errorPage in Mytemp.jsp, tomcat displays the
exception stack in the browser itself..
Any help would solve my problem..
-pk