Struts2中的MethodFilterInterceptor

来源:互联网 发布:nginx ftp 配置 编辑:程序博客网 时间:2024/06/05 03:39

这是一个Struts2.1.8.1应用,代码如下

首先是web.xml文件

然后用于提交方法过滤测试的methodFilter.jsp页面

然后是用于显示方法过滤结果的methodFilterResult.jsp页面

然后是struts.xml文件

实现了Interceptor接口的自定义拦截器MyInterceptor11.java

继承了AbstractInterceptor类的自定义拦截器MyInterceptor22.java

继承了MethodFilterInterceptor拦截器类的自定义拦截器MyInterceptor33.java

最后是用到的Action类

原创粉丝点击