问题原因可能是程序中getServletContext().getRequestDispatcher("").forward(req, resp); 后面再跟着一个response.sendRedirect(""); 检查代码、去除这种情况发生。