明天的明天的明天

          用鍵盤改變生活

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

          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 閱讀(1713) 評論(5)  編輯  收藏

          Feedback

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

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

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

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

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


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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 怀仁县| 山丹县| 长沙县| 长岭县| 东辽县| 宜城市| 通海县| 思茅市| 稻城县| 广宁县| 清水县| 行唐县| 陇西县| 岑巩县| 简阳市| 如皋市| 吴江市| 台湾省| 南康市| 航空| 永安市| 斗六市| 浙江省| 千阳县| 盐山县| 武穴市| 荆门市| 剑河县| 罗甸县| 新和县| 和政县| 葫芦岛市| 韶山市| 宁明县| 财经| 凤庆县| 阳东县| 永城市| 五台县| 房产| 阳新县|