在web.xml 里面配置
 <error-page>
    <error-code>404</error-code>
    <location>/http_error.jsp</location>
   </error-page>如果登录 login.jsp 页面 ,页面存在已经登陆上去了,但是页面上有个图片的地址不对下面是http_error.jsp 页面 后台就会输出一直输出 statusCode=404(地址改对后台就不会一直输出statusCode=404),但是又不会跳转到404.jsp 页面,这个奇怪的BUG 有谁知道吗?//下面是http_error.jsp页面
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<html>
    <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'http_error.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->    </head>
  <body>
    <%
  int statusCode = (Integer)request.getAttribut("javax.servlet.error.status_code");
  System.out.println("statusCode="+statusCode);
  if(statusCode==404)
response.sendRedirect("404.jsp");
  if(statusCode==500) 
response.sendRedirect("500.jsp");
%>
  </body>
</html>