學習筆記,每一天我們都在進步。
2007/04/02 23:16
Interceptors provide an excellent means to wrap before/after processing. The concept reduces code duplication (think AOP).

Order of interceptors...

<interceptor-stack name="xaStack">
 <interceptor-ref name="thisWillRunFirstInterceptor"/>
 <interceptor-ref name="thisWillRunNextInterceptor"/>
 <interceptor-ref name="followedByThisInterceptor"/>
 <interceptor-ref name="thisWillRunLastInterceptor"/>
</interceptor-stack>

Note that some interceptors will interrupt the stack/chain/flow... so the order is very important.

Iterceptors implementing com.opensymphony.xwork.interceptor.PreResultListener will run after the Action executes its action method but before the Result executes

thisWillRunFirstInterceptor
 thisWillRunNextInterceptor
   followedByThisInterceptor
     thisWillRunLastInterceptor
       MyAction1
       MyAction2 (chain)
       MyPreResultListener  
       MyResult (result)
     thisWillRunLastInterceptor
   followedByThisInterceptor
 thisWillRunNextInterceptor
thisWillRunFirstInterceptor
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]