Web.xml: This type of writing is problematic in IE browser. "Show friendly HTTP error prompts" must be ticked off in the IE tools-> Internet Options-> "advanced"; but we can't control the client's browser <error-page> <error-code>404</ error-code> <location>/error404.jsp</location> </error-page> <error-page> < error-code>500</error-code> <location>/error500.jsp</location> </error-page>--------- -------------------Right: <welcome-file-list> <welcome-file>index.jsp</welcome-file> </ welcome-file-list> <error-page> <error-code>404</error-code> <location>/error.jsp</ location> </error-page> <error-page> <error-code>400</error-code> <location>/ error.jsp</location> </error-page> <error-page> <error-code>500</error-code> < Location>/error.jsp</location> </error-page> error.jsp: <%@ page contenttype= "text/html; charset=gb2312 "language=" java import= "java.io.*" errorpage= "error.jsp"%>