javax.servlet.http.HttpServletResponse.sendRedirect(java.lang.String location)

解决方案 »

  1.   

    RequestDispatcher dispatch = getServletContext().getRequestDispatcher(
                "/jsp/xmSys/xm_pregister.jsp");
    dispatch.forward(request, response);或者
    response.sendRedirect();
      

  2.   

    <jsp:useBean id="loginInfo" scope="session" class="zrmis.xmSys.XmLoginStoreBean"/>
    <%
    if(!loginInfo.getPermit()){
      response.sendRedirect("xm_login.jsp");
    }
    %>
      

  3.   

    jsp:
    response.sendRedirect("index.jsp");js:
    location.href = "index.jsp"
      

  4.   

    js的:function check(){
              if(不符合条件){
                  window.location.href="login.html";
              }
              window.location.href="index.jsp";
          }
    如果你的上一页就是login.html,那window.location.href="login.html";
    可以改成window.history.back();
      

  5.   

    改一下:function check(){
              if(不符合条件){
                  window.location.href="login.html";
              }else{
                  window.location.href="index.jsp";
              }
          }
      

  6.   

    response.sendRedirect("liuyanban.htm")
      

  7.   


    java:response.sendRedirect("index.jsp");
    jsp:<jsp:forward page="index.jsp"/>;
    js:location.href = "index.jsp";