明天的明天的明天

          用鍵盤改變生活

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            17 Posts :: 0 Stories :: 19 Comments :: 0 Trackbacks
          這個問題,本來已經搞好了,但是忘了重新編譯,郁悶了半天。。
          下面看看解決方案吧:

          Any existing applications that use the Cancel processing will need to modify their struts-config.xml to set the cancellable property for actions which require it.

          In Struts 1.2.9 the <set-property> is used to set the cancellable property for an action....

              <action path="/fooAction"
          input="/foo.jsp"
          validate="true">
          <set-property property="cancellable" value="true"/>
          <forward name="success" path="/bar.jsp"/>
          </action>
          

          From Struts 1.3.x a new cancellable attribute can be used....

              <action path="/fooAction"
          input="/foo.jsp"
          validate="true"
          cancellable="true">
          <forward name="success" path="/bar.jsp"/>
          </action>
          

          In both Struts 1.2.9 and Struts 1.3.x an exception handler can be configured to handle the InvalidCancelException

              <action path="/fooAction"
          input="/foo.jsp"
          validate="true"
          cancellable="true">
          <forward name="success" path="/bar.jsp"/>
          <exception key="errors.cancel"
          type="org.apache.struts.action.InvalidCancelException"
          path="/foo.jsp"/>
          </action>
          
          posted on 2007-10-20 01:20 Endless 閱讀(1714) 評論(5)  編輯  收藏

          Feedback

          # re: 標簽報org.apache.struts.action.InvalidCancelException錯誤問題 2007-10-31 16:11 流浪汗
          多謝,我也遇到此問題.  回復  更多評論
            

          # re: 標簽報org.apache.struts.action.InvalidCancelException錯誤問題 2008-07-23 10:04 lui
          我也遇到了這個問題,用博主的方法試了一下,果然,點擊cancel以后不會包異常了,但是, 這時候點擊submit和cancel的結果是一樣的,這并不是我們想要的結果. 后來干脆 我直接把<html:cancel/>改成了<html:reset/>,結果一切OK了  回復  更多評論
            

          # re: 標簽報org.apache.struts.action.InvalidCancelException錯誤問題 2008-08-21 19:01 admin
          錯誤解決了啊 謝謝你啊 啊   回復  更多評論
            

          # re: 標簽報org.apache.struts.action.InvalidCancelException錯誤問題 2009-02-23 09:19 GGYY
          先謝謝樓主了,三樓的問題我還沒有調試,先試一下再說吧,呵呵  回復  更多評論
            

          # re: 標簽報org.apache.struts.action.InvalidCancelException錯誤問題[未登錄] 2010-07-23 16:04 123
          @lui
          你沒有弄清楚reset和cancel的區別  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 文成县| 长寿区| 麻栗坡县| 靖宇县| 苏尼特右旗| 普定县| 渝中区| 故城县| 五峰| 柯坪县| 伊吾县| 达孜县| 尼玛县| 日照市| 昆山市| 绍兴市| 阿合奇县| 黎平县| 扎鲁特旗| 宜昌市| 娱乐| 汕头市| 巩留县| 政和县| 视频| 荣成市| 兰州市| 永年县| 大安市| 溧水县| 大埔县| 县级市| 五河县| 井冈山市| 中超| 英吉沙县| 临夏市| 巴青县| 安徽省| 常熟市| 屏东县|