Hello friends,
I have configured an error page to handle 500 error.
Webserver used:
Tomcat 5
In DD of my application I have made the following entry
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
Following is the
jsp page which generates the error.
<%
Boolean flag = false;
if( !flag )
{
response.sendError(500, "Access forbidden boss");
}
%>
Following is the error.jsp
<%@ page isErrorPage="true" %>
Error = <font color="Red" size="8"><%=exception.getMessage()%></font>
By doing the above settings I am unable to see the custom error page. What I see is the default error page which tomcat generates.
I am able to see the custom error page for <exception-type> tag in DD.
Can anyone please help where I am going wrong ?
Few of the members suggested that in IE please uncheck "Show friendly HTTP error messages" in Advanced tab in tools-->Options. Few others suggested that the contents should be more than 5KB. If the custom error page contents are less than 5KB then default error page is shown.
I tried all of the above things but I am unable to see the custom error page for <error-code>
Please help..
Waiting for your replies.
Thanks and Regards
Rohit.
[ May 09, 2007: Message edited by: Rohit Bhagwat ]