response.sendRedirect使用注意事项 .
生活随笔
收集整理的這篇文章主要介紹了
response.sendRedirect使用注意事项 .
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
response.sendRedirect使用注意事項 .
問題:最近在調(diào)試xwiki的時候遇到j(luò)ava.lang.IllegalStateException異常,
解決方案:
在response.sendRedirect("")方法后加return;語句即可:
原因是在程序中兩次調(diào)用response.sendRedirect("")方法
jdk5.0文檔中很清楚地介紹了出現(xiàn)IllegalStateException異常的可能情況:
1)同一個頁面中再次調(diào)用response.sendRedirect()方法。
2)提交的URL錯誤,即不是個有效的URL。
?
轉(zhuǎn)載于:https://www.cnblogs.com/qqzy168/archive/2013/06/14/3136971.html
總結(jié)
以上是生活随笔為你收集整理的response.sendRedirect使用注意事项 .的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySQL5.5加主键锁读问题【转】
- 下一篇: 计算几何相关资料+题目推荐(不定期补充)