web.xml错误页面的配置
格式:在这里插入代码片<error-page> <error-code> </error-code> <location> </location> </error-page>
1.错误页面配置配置文件必须大于1024字节;
2.location指定的路径必须以斜线开头,也就是说它是相对于Web应用的根;形式为/xxx.jsp /;
3.如果配置是html时,不用另做配置
如果配置是Jsp时,需要把isErrorPage设置为true ;<%@ page isErrorPage=“true” %>