David.Ko

          Follow my heart!
          posts - 100, comments - 11, trackbacks - 0, articles - 0
             :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          日歷

          <2007年12月>
          2526272829301
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          公告

          大家可以通過我的QQ:398956598MSN:wjmjhfs@hotmail.com 和我聯(lián)系!!

          相冊(cè)

          積分與排名

          • 積分 - 91024
          • 排名 - 636

          最新評(píng)論

          java.lang.IllegalStateException

          Posted on 2007-04-30 18:23 David.Ko 閱讀(8088) 評(píng)論(4)  編輯  收藏 所屬分類: j2se
          最近做的在response.sendRedirect()時(shí)出現(xiàn)下列錯(cuò)誤:
          java.lang.IllegalStateException
           org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:423)

          經(jīng)過搜索找到解決的辦法:



          j2ee5.0中的介紹:

          sendRedirect

          void sendRedirect(java.lang.String location)
          throws java.io.IOException
          Sends a temporary redirect response to the client using the specified redirect location URL. This method can accept relative URLs; the servlet container must convert the relative URL to an absolute URL before sending the response to the client. If the location is relative without a leading '/' the container interprets it as relative to the current request URI. If the location is relative with a leading '/' the container interprets it as relative to the servlet container root.

          If the response has already been committed, this method throws an IllegalStateException. After using this method, the response should be considered to be committed and should not be written to.

           

          Parameters:
          location - the redirect location URL
          Throws:
          java.io.IOException - If an input or output exception occurs
          java.lang.IllegalStateException - If the response was committed or if a partial URL is given and cannot be converted into a valid URL


          此類的樹結(jié)構(gòu):http://www.leftworld.net/online/j2sedoc/javaref/java.lang.illegalstateexception_dsc.htm

          評(píng)論

          # re: java.lang.IllegalStateException  回復(fù)  更多評(píng)論   

          2007-07-17 19:03 by sdf
          不能同時(shí)有兩次的response.sendRedirect();

          # re: java.lang.IllegalStateException  回復(fù)  更多評(píng)論   

          2007-08-22 19:07 by sdu
          很不錯(cuò)喲....謝謝

          # re: java.lang.IllegalStateException  回復(fù)  更多評(píng)論   

          2007-12-19 16:15 by fireox
          Thank you very much.

          # re: java.lang.IllegalStateException  回復(fù)  更多評(píng)論   

          2008-08-12 22:52 by freeit
          thanks

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 航空| 兴海县| 贵定县| 宁乡县| 田阳县| 南安市| 东至县| 厦门市| 英德市| 丹凤县| 油尖旺区| 元阳县| 临汾市| 微山县| 邵阳县| 沙河市| 将乐县| 安平县| 兰西县| 定远县| 海口市| 天长市| 平陆县| 英吉沙县| 仁寿县| 黑山县| 同德县| 惠东县| 辽中县| 山阳县| 东乡县| 札达县| 饶阳县| 台江县| 湾仔区| 巨野县| 苍溪县| 福州市| 神农架林区| 灌云县| 泸定县|