Cannot forward after response has been committed

时间:2023-12-30 10:39:20

项目:蒙文词语检索

日期:2016-05-01

提示:Cannot forward after response has been committed

出处:request.getRequestDispatcher("admin.jsp").forward(request, response);

解决方法:

  原代码:request.getRequestDispatcher("admin.jsp").forward(request, response);

  修改成:删除此行或者注释掉。

分析:

  是因为request.getRequestDispatcher("admin.jsp").forward(request, response);之前有一个response.sendRedirect("admin.jsp");而造成了冲突。