在web.xml中配置
<error-page>
<error-code>400</error-code> 错误代码
<location>/index.jsp</location> 出现的页面
</error-page>
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
<error-page>
<error-code>505</error-code>
<location>/505.jsp</location>
</error-page>
等等
你也配置其他的异常 <error-page>
<exception-type>java.io.IOException</exception-type> IO类异常
<location>/ioerror.jsp</location> 页面
</error-page>
<error-page>
<error-code>400</error-code> 错误代码
<location>/index.jsp</location> 出现的页面
</error-page>
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
<error-page>
<error-code>505</error-code>
<location>/505.jsp</location>
</error-page>
等等
你也配置其他的异常 <error-page>
<exception-type>java.io.IOException</exception-type> IO类异常
<location>/ioerror.jsp</location> 页面
</error-page>
<error-code>和<error-page>
根据特定的错误码调用相应的error-page给客户
如果是用STRUTS的话,就比较好管理.
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>400</error-code>
<location>/sysAdmin/login.htm</location>
</error-page>
</web-app>不管用啊