Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP error handling does not work with Internet Explorer

843836Jul 12 2005 — edited May 11 2010
I am working on a web application, and need to display some user friendly html/jsp pages if in case there is any server error. Iam working on weblogic 8.1 and Internet Explorer 6.0. As a test example, Iam trying to display a simple html page if there is an error 404 which signifies URL not found. Here is the sample code--
****form.html****
<form action="myjsp.jsp">
<input type="text">
<input type="submit" value="submit">
****error.html****
<h2> An Internal Server Error Has Occurred </h2>
****web.xml*****
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>
</web-app>
This code works fine with all the other web browsers (opera 8.0, mozilla, netscape 6.0) and displays "error.html", since the "myjsp.jsp" page is not found. It does not work with Internet explorer 6.0 and displays the default Internet Explorer page with error 404. I have check for the proxy setting, disabled 3rd party browser extensions and checked for other setting, but it still does not work. Please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2010
Added on Jul 12 2005
6 comments
283 views