web.xml 中配置了error-page但不起作用问题

问题:

  在web.xml 中配置了 error-page,但是好像不起作用,就是跳转不到指定的页面。

     配置信息如下:

  

 1 <!-- 400错误 -->
 2     <error-page>
 3     <error-code>400</error-code>
 4     <location>/WEB-INF/deploy/pms/jsp/error.jsp</location>
 5     </error-page>
 6     <!-- 404 页面不存在错误 -->
 7     <error-page>
 8     <error-code>404</error-code>
 9      <location>/WEB-INF/deploy/pms/jsp/404.jsp</location>
10     </error-page>
11     <!-- 500 服务器内部错误 -->
12     <error-page>
13     <error-code>500</error-code>
14     <location>/WEB-INF/deploy/pms/jsp/500.jsp</location>
15     </error-page>

解决办法:

  保证跳转的页面路径都正确的话,可能的原因是IE的设置问题。要确保下面的设置没有被勾选

  IE的"工具"菜单-->"Internet 选项"-->"高级"选项卡-->"显示友好 HTTP 错误信息"。

posted @ 2013-08-05 15:19  愤怒的码农  阅读(3372)  评论(0编辑  收藏  举报