亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

重定向出錯

重定向出錯

慕妹8769748 2015-10-11 21:32:56
嚴重: Servlet.service() for servlet [jsp] in context with path [/imooc_jspstudy] threw exception [An exception occurred processing JSP page /response.jsp at line 19 pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title></head><body> <h1>response內置對象</h1> <hr> <%=request.getContextPath() %> <% out.print("<p>你好!</p>"); out.flush(); PrintWriter outer = response.getWriter(); outer.print("這是response的輸出流用法"); response.sendRedirect("request.jsp"); %></body></html>Stacktrace:] with root causejava.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
查看完整描述

3 回答

?
慕妹8769748

TA貢獻2條經驗 獲得超0個贊

重定向和轉發的頁面不可以有HTML標簽的輸出

查看完整回答
反對 回復 2015-10-13
?
慕妹8769748

TA貢獻2條經驗 獲得超0個贊

大神能具體點么 謝謝了

查看完整回答
反對 回復 2015-10-12
?
echo_kinchao

TA貢獻600條經驗 獲得超86個贊

定向錯了

查看完整回答
反對 回復 2015-10-11
  • 3 回答
  • 0 關注
  • 1548 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號