第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Strus2.5更新用戶成功后視圖自動(dòng)跳轉(zhuǎn)不成功

Strus2.5更新用戶成功后視圖自動(dòng)跳轉(zhuǎn)不成功

小冥王 2016-12-16 18:03:35
public?String?updateStu(){ ????????StudentService?ss?=?new?StudentServiceImpl(); ????????int?id?=?Integer.parseInt(request.getParameter("id")); ????????Student?s?=?ss.getStudentById(id);? ????????request.setAttribute("stu",?s);???? ????????try?{ ????????????request.getRequestDispatcher("/jsps/PrepareUpdate.jsp").forward(request,?response); ????????}?catch?(ServletException?e)?{ ????????????e.printStackTrace(); ????????}?catch?(IOException?e)?{ ????????????e.printStackTrace(); ????????} ???????? ????????String?name?=?request.getParameter("name"); ????????int?age?=?Integer.parseInt(request.getParameter("age")); ????????Student?s1?=?new?Student(id,name,age); ????????ss.updateStudent(s1); ????????try?{ ????????????response.sendRedirect("../getAll_stu.do"); ???????????? ????????}?catch?(IOException?e)?{ ????????????//?TODO?自動(dòng)生成的?catch?塊 ????????????e.printStackTrace(); ????????}???????? ????????return?"update";???????? ????}異常顯示:Cannot call sendRedirect() after the response has been committed??? 響應(yīng)后提交不能調(diào)用sendRedirect()?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1173 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)