用ajax写用户名验证时,在servlet写了个跳转话语不能执行

用ajax写用户名验证时,在servlet写了个跳转语句不能执行用response.sendRedirect(login.jsp)这个显示se

用ajax写用户名验证时,在servlet写了个跳转语句不能执行


用response.sendRedirect("login.jsp");这个显示
用ajax写用户名验证时,在servlet写了个跳转话语不能执行 servlet?ajax?jsp
[解决办法]
再客户端跳转,服务端跳转ajax不会理会的

// out.print("<script>window.location.href='login.jsp';</script>");
 out.print("1");


if(ajaxobj.responseText=='1')window.location='login.jsp'