“在sendRedirect中提交响应后,禁止发送重定向”

时间:2014-06-27 07:49:46

标签: jsp

if(insertLen==6)
      {
          nextpag="&whichpage=/jsp/dealer/callcentre/CareProcess.jsp"
          redirectpath += actionPath+nextpag;                 
          response.sendRedirect(redirectpath);
          return;
      }
      else
      {
          nextpag="&whichpage=/jsp/dealer/callcentre/complaintFeedBack.jsp";
          response.sendRedirect(redirectpath);
      }     

这里当我执行上述操作时,出现以下错误:

Sending a redirect is forbidden after the response has been committed

我可以知道为什么会这样吗?

0 个答案:

没有答案