The example in this article describes a workaround for 500 errors when building exception objects in a JSP. Share to everyone for your reference, specific as follows:
Try using the built-in exception object of the JSP to write the following three files. The idea is very simple, the file index if the submission string is empty, then get thrown exception, referred to error.jsp processing. But the actual does not run normally, will appear IE 500 error page. The environment is Tomcat 5.5,ie6.0.
In Sun's forum someone posted the reason, ie is a certain setting. Tomcat5.0 the later version of the error page will return error code 500 when processing. IE after the Code 500 will check the length of the page, when the length of less than a certain value, it will use its default 500 error pages to replace the error page set. It's called "user-friendliness" (it's been a long time and I'm not friendly at all).
Then the workaround could be to modify IE
Settings: Remove IE "tools--internet option-advanced-Show friendly HTTP error messages" option, or increase the length of your error page.
index.jsp
<% @page language= "java" errorpage= "error.jsp"%>
error.jsp
<% @page language= "java" iserrorpage= "true"%>
Personal Summary
The so-called increase in length, that is, in the error.jsp file, more copies of some text content, you can run the normal.
I hope this article will help you with JSP program design.