List<User> list = dao.getAllUsers();
for (User user : list) {
if(user.getUsername().equals(username)&&user.getPassword().equals(pwd)){
request.getRequestDispatcher("../show.jsp").forward(request, response);
}
response.sendRedirect("../index.jsp");
我输入正确的就进去了,而输错了就不能跳转到index.jsp报java.lang.IllegalStateException求解决方法,我该怎么写?
http://stackoverflow.com/questions/15392423/java-lang-illegalstateexception-on-response-sendredirectlocation