Not able to configure Error Page?

Customers have often reported issues that they are not able to configure error page even though the do the configuration in the web.xml correctly

<?xml version=’1.0′ encoding=’UTF-8′?>
<web-app xmlns=”” xmlns:xsi=””>


<%@page isErrorPage=”true” contentType=”text/html” %>
Request that failed: ${pageContext.errorData.requestURI}
<br />
Status code: ${pageContext.errorData.statusCode}
<br />
Exception: ${pageContext.errorData.throwable}
<br />
String s = null;

When I deployed this application on Weblogic Server and tried to acces the application. I got null pointer exception causing server to send HTTP 500 Response
with Exception

at jsp_servlet.__index._jspService(
at weblogic.servlet.jsp.JspBase.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
Truncated. see log file for complete stacktrace

But since we had done the error page configuration, we expected to see our custom error page. This was not the case.
We saw the following. ( Note I was using IE 7)

I had to do the following configuration change on IE to get it working. ( Uncheck Show Friendly HTTP Error Messages)

After changing the IE Setting, I was able to get the custom error page.

Reference :-


  1. Hi,

    why don’t you use web server to configure error page, instead of configuring in web.xml. if it is configured in web server it very easy to access than application server. performance wise also it is good practice

    Ravi Kumar Guduru

    1. Thanks for you suggestion Ravi.
      Yes its convenient to configure the error page on the web server end, however there are scenarios where there are no Web Servers infront of WLS.
      Then this technique can be applied.

  2. Increase the size of the error.jsp to more than 1KB and the error page will show up without changing the IE option. If the size is less 1KB IE thinks it is the standard HTTP error from the web server and replaces with its own supposed to be friendly error message page. Increasing the size of the .jsp from 1KB to 5KB worked for me. Added some random text within

Comments are closed.