在servlet写了个跳转语句不能执行
if(flag){ out.print("The user name has been registered!"); }else{ //out.print("<script>window.location.href='login.jsp';</script>"); response.sendRedirect("login.jsp"); }