J2EE社区

苟有恒,何必三更起五更眠;
最无益,只怕一日曝十日寒.
posts - 241, comments - 318, trackbacks - 0, articles - 16

struts2 Interceptor

Posted on 2010-07-24 18:29 xcp 阅读(505) 评论(0)  编辑  收藏 所属分类: struts2
 一、Strus2三种方式实现自定义Interceptor的方式
       1.实现拦截器类一般可以实现com.opensymphony.xwork2.interceptor.Interceptor接口
       2.直接继承AbstractInterceptor类
       3.Struts2还提供了一个MethodFilterIntercepter类,该类是AbstractInterceptor类的子类,如果你需要实现的拦截器支持方法过滤性,就继承MethodFilterIntercepter这个类(说白了就是给action中指定的方法加拦截)



名称: ♪4C.ESL | .↗Evon
口号: 遇到新问题♪先要寻找一个方案乄而不是创造一个方案こ
mail: 联系我