Jspexception is a solution for 500 errors when the exception object is built in JSP.

Source: Internet
Author: User

Jspexception is a solution for 500 errors when the exception object is built in JSP.

This article describes how to solve the 500 error when the exception object is built in JSP. We will share this with you for your reference. The details are as follows:

Try to use the built-in exception object of JSP and write the following three files. The idea is simple. If the file index is empty, get throws an exception and is handled by error. jsp. However, the error page of IE 500 is displayed. The environment is Tomcat 5.5 and IE6.0.

Someone posted the reason on sun's Forum, which is a certain setting of IE. Error code 500 is returned when error page of Tomcat5.0 and later versions are processed. After IE gets code 500, it will check the length of the page. When the length is lower than a certain value, it will use its default 500 error page to replace the specified error page. It is called "user-friendly" (This problem takes a lot of time and is unfriendly at all ).

The solution can be to modify IE

Set: cancel the "tool-Internet option-advanced-show friendly HTTP error message" option of IE, or increase the length of your error page.

Index. jsp

Get. jsp

<%@page language="java" errorPage="error.jsp"%>

Error. jsp

<%@page language="java" isErrorPage="true"%>

Personal Summary

To increase the length, you can copy more text in the error. jsp file to run properly.

I hope this article will help you with JSP program design.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.