jsp+servlet跳转问题: Cannot call sendRedirect() after the respon
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/09/20 09:27:42
jsp+servlet跳转问题: Cannot call sendRedirect() after the response has been committed
上面的图是jsp
下面的是servlet
开始先访问jsp页面,判断是否能够拿到session,拿不到就重定向到servlet,servlet拿到之后再重定向到jsp.问题:执行到jsp的
if(goodsInfos==null){
response.sendRedirect("GoodsInfo_con?function=goodsList");
}这个if就抛异常了: Cannot call sendRedirect() after the response has been committed
.servlet都进不去了.在线求解
上面的图是jsp
下面的是servlet
哎,不知道在说什么啊.
不过看起来是你在页面用了response.sendRedirect() .你之前的代码是不是有跳转啊?
在页面提交,你可以用javascript啊.可以用form的submit();
再问: 在jsp页面之前没有跳转过
再答: 建议你还是不要这么写了,你说你的需求,我给你个方案吧。
再问: 您有qq吗,您是高手吧,我想多向你学习
再答: 120329750
不过看起来是你在页面用了response.sendRedirect() .你之前的代码是不是有跳转啊?
在页面提交,你可以用javascript啊.可以用form的submit();
再问: 在jsp页面之前没有跳转过
再答: 建议你还是不要这么写了,你说你的需求,我给你个方案吧。
再问: 您有qq吗,您是高手吧,我想多向你学习
再答: 120329750
jsp+servlet跳转问题: Cannot call sendRedirect() after the respon
多个jsp页面调用同个servlet时出现错误Cannot call sendRedirect() after the
在利用JSP编程的时候,总是遇见 Cannot call sendRedirect() after the respon
jsp+servlet的问题,提交时报错:Cannot forward after response has been
javax.servlet.jsp.JspException cannot be resolved to a type
javax.servlet.jsp.JspException:Cannot find bean under name o
javax.servlet.jsp.JspException:Cannot find ActionMappings or
jsp Cannot forward after response has been committed问题,
response.sendRedirect ("index.jsp") 和
response.sendRedirect(request.getContextPath()+"/index.jsp")
The type javax.servlet.ServletContext cannot be resolved.It
JSP 文件下载时出现:Cannot forward after response has been committed