改成下面的形式试试?        <%if(loginInfo_Bean.password!=password1){%>
                  <jsp:forward page="error/PwdNotEqual.jsp" flush="true"/>
  <%}else if(loginInfo_Bean.password == null){%>
   <jsp:forward page="error/PwdNull.jsp" flush="true"/>
  <%}else if(loginInfo_Bean.name==null){%>
   <jsp:forward page="error/NameNull.jsp" flush="true"/>
  <%}%>

解决方案 »

  1.   

    而且有可能是你的jsp页面设定了"非缓冲输出".另外,flush="true" 是缺省值,可以不写.
      

  2.   

    改成这样应该没问题.用response对象的sendRedirect方法.
    <%if(loginInfo_Bean.password!=password1){
        response.sendRedirect("error/PwdNotEqual.jsp");
    }else if(loginInfo_Bean.password==null){
        response.sendRedirect("error/PwdNull.jsp");
    }else if(loginInfo_Bean.name==null){
        response.sendRedirect("error/NameNull.jsp");
    }%>
      

  3.   

    不要出现任何的html代码就可以了
      

  4.   

    写得有点麻烦:
    <%
    String url;
    if(loginInfo_Bean.password!=password1){
        url = "error/PwdNotEqual.jsp";
    }else if(loginInfo_Bean.password==null){
        url = "error/PwdNull.jsp";
    }else if(loginInfo_Bean.name==null){
        url = "error/NameNull.jsp";
    }else{
        url = "index.jsp";
    }
    response.sendRedirect(url);
    %>
      

  5.   

    你的这段代码之前或许执行了某个方法使buffer committed 了,例如sendRedirect(),commit(),forward() 等。
      

  6.   

    我也碰到了这中问题:按:jerrykey(钥匙)说的可以搞定的