I am using Tomcat 7 and JSP pages. I would like to provide a custom error page for HTTP 500 errors.
What I did is to declare the custom error page as following in web.xml
:
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
And I created a JSP called error.jsp
with the following code:
<%@ page pageEncoding="UTF-8" isErrorPage="true" %>
<!DOCTYPE html>
<html>
<head>
<title>500</title>
</head>
<body>
<img src="${pageContext.request.contextPath}/images/500.jpg" />
</body>
</html>
Now this works in most browsers, but in Internet Explorer I am taken to the standard "The website cannot display the page" page.
Why is my custom HTTP 500 error page not being displayed in Internet Explorer?