锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产婷婷香蕉久久久久久99,国产精品永久免费在线,青青久在线视频免费观看http://www.aygfsteel.com/apl330/category/45812.htmlzh-cnTue, 14 Dec 2010 21:50:54 GMTTue, 14 Dec 2010 21:50:54 GMT60閰嶇疆Struts榪囩▼鍑洪棶棰?/title><link>http://www.aygfsteel.com/apl330/archive/2010/12/14/340613.html</link><dc:creator>jack zhai</dc:creator><author>jack zhai</author><pubDate>Tue, 14 Dec 2010 02:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/apl330/archive/2010/12/14/340613.html</guid><wfw:comment>http://www.aygfsteel.com/apl330/comments/340613.html</wfw:comment><comments>http://www.aygfsteel.com/apl330/archive/2010/12/14/340613.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/apl330/comments/commentRss/340613.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/apl330/services/trackbacks/340613.html</trackback:ping><description><![CDATA[<p><package name="member" namespace="/member" extends="struts-default"> <br>      <action name="regist" class="cc.apl330.action.MemberAction"> <br>         <font color="#ff0000"><result >/suc.jsp</result></font> <br>          <result name="isExists">/fail.jsp</result> <br>      </action> <br>  </package></p> <p><font color="#ff0000">榪愯姝e父錛岀敤鎴鋒敞鍐屾垚鍔熷悗浼氳煩杞埌suc.jsp</font></p> <p> </p> <p>濡傛灉灝嗛厤緗敼鎴?/p> <p><package name="member" namespace="/member" extends="struts-default"> <br>      <action name="regist" class="cc.apl330.action.MemberAction"> <br>         <font color="#ff0000"><result >/suc.html</result></font> <br>          <result name="isExists">/fail.jsp</result> <br>      </action> <br>  </package></p> <p><font color="#ff0000">榪愯涓嶆甯革紝鐢ㄦ埛杈撳叆鏁版嵁鍚庯紝鐐瑰嚮紜畾銆傛煡鐪嬫暟鎹簱錛屾暟鎹簱鍐欏叆姝e父錛屼絾欏甸潰絀虹櫧錛屽湴鍧鏍忓嵈姝e父錛?/font><a href="http://localhost:8080/test/member/regist"><font color="#ff0000">http://localhost:8080/test/member/regist</font></a></p> <img src ="http://www.aygfsteel.com/apl330/aggbug/340613.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/apl330/" target="_blank">jack zhai</a> 2010-12-14 10:58 <a href="http://www.aygfsteel.com/apl330/archive/2010/12/14/340613.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎷︽埅鍣ㄧ殑瀹炵幇鍘熺悊http://www.aygfsteel.com/apl330/archive/2010/07/31/327638.htmljack zhaijack zhaiSat, 31 Jul 2010 07:19:00 GMThttp://www.aygfsteel.com/apl330/archive/2010/07/31/327638.htmlhttp://www.aygfsteel.com/apl330/comments/327638.htmlhttp://www.aygfsteel.com/apl330/archive/2010/07/31/327638.html#Feedback0http://www.aygfsteel.com/apl330/comments/commentRss/327638.htmlhttp://www.aygfsteel.com/apl330/services/trackbacks/327638.html

榪愯涓葷被
Main.java

public class Main {
    public static void main(String[] args) {
        new ActionInterceptor().invoke() ;
    }
}

/********************************/

鎷︽埅鍣ㄦ牳蹇?br>ActionInterceptor.java

import java.util.ArrayList;
import java.util.List;

public class ActionInterceptor {
    List<Inte> intes = new ArrayList<Inte>() ;
    int index = -1 ;
    public ActionInterceptor() {
        intes.add(new FistInte()) ;
        intes.add(new SecondInte()) ;
    }
    public void invoke() {
        index++ ;
        if(index >= intes.size()) {
            new Action().execute() ;
        }else {
            this.intes.get(index).inte(this) ;
        }
    }
}

/********************************/

鎺ュ彛:涓庢嫤鎴櫒涔嬮棿鐨勯氳鎺ュ彛
Inte.java

public interface Inte {
    void inte(ActionInterceptor actioninterceptor) ;
}

/********************************/

鎺ュ彛浣跨敤綾?br>FistInte.java
public class FistInte implements Inte {

    @Override
    public void inte(ActionInterceptor actioninterceptor) {
        System.out.println(1) ;
        actioninterceptor.invoke() ;
        System.out.println(-1) ;
    }
}

SecondInte.java
public class SecondInte implements Inte {

    @Override
    public void inte(ActionInterceptor actioninterceptor) {
        System.out.println(2) ;
        actioninterceptor.invoke() ;
        System.out.println(-2) ;
    }
}

/********************************/

鍔ㄤ綔綾?

Action.java
public class Action {
    public void execute() {
        System.out.println("execute!") ;
    }
}



jack zhai 2010-07-31 15:19 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 柳河县| 庐江县| 莱阳市| 双鸭山市| 板桥市| 辉南县| 兴化市| 安仁县| 琼海市| 镇康县| 湘西| 华蓥市| 桂平市| 莱州市| 卓资县| 永年县| 万载县| 庆安县| 柳江县| 双城市| 南溪县| 和田市| 柳河县| 沁阳市| 丽水市| 新余市| 福贡县| 福泉市| 遵化市| 抚宁县| 睢宁县| 奈曼旗| 汉川市| 内江市| 独山县| 新泰市| 靖江市| 奎屯市| 黑水县| 南平市| 大宁县|