StrutsPrepareAndExecuteFilter的作用 Struts
来源:互联网 发布:linux 打开vim编辑器 编辑:程序博客网 时间:2024/05/03 05:27
http://blog.sina.com.cn/s/blog_6ac4c6cb010190ml.html
FilterDispatcher是早期struts2的过滤器,后期的都用StrutsPrepareAndExecuteF
FilterDispatcher是struts2.0.x到2.1.2版本的核心过滤器.!
StrutsPrepareAndExecuteF
这样的改革当然是有好处的.!
为什么这么说.? 应该知道如果我们自己定义过滤器的话, 是要放在strtus2的过滤器之前的, 如果放在struts2过滤器之后,你自己的过滤器对action的过滤作用就废了,不会有效!除非你是访问jsp/html!
那我现在有需求, 我必须使用Action的环境,而又想在执行action之前拿filter做一些事, 用FilterDispatcher是做不到的.!
那么StrutsPrepareAndExecuteF
给你打个比喻, 现在有病人要做手术, 现在struts2要做两件事, 搭病床(环境),执行手术.! 那么打麻药的工作呢.? 不可能要病人站着打吧, 所以必须有病床的环境,打完麻药之后再动手术.! 这个比喻非常形象了.!
如果是2.1.3之前的版本,用org.apache.struts2.dispatcher.FilterDispatcher,
否则,用org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteF
三个初始化参数:
</filter>
<filter-mapping>
</filter-mapping>
如果程序报类找不到异常,且后面有
等信息,可能是你的版本问题.解决方法是确定你的struts版本,如果是2.1.3之前的版本,用 org.apache.struts2.dispatcher.FilterDispatcher,以后的版本则配置org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteF
- StrutsPrepareAndExecuteFilter的作用 Struts
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用,和FilterDispatcher区别
- FilterDispatcher和StrutsPrepareAndExecuteFilter的作用及应用
- SSH2之 struts配置文件里 StrutsPrepareAndExecuteFilter 与 FilterDispatcher的区别
- struts2 StrutsPrepareAndExecuteFilter作用及配置
- struts plugIn的作用
- [Leetcode] 421. Maximum XOR of Two Numbers in an Array 解题报告
- CCD靶面尺寸对应的宽高和对角线长度
- java实现图片等文件类型的本地复制
- spark 调优及运行原理
- linux安装redis4.0
- StrutsPrepareAndExecuteFilter的作用 Struts
- JS取随机数
- shiro讲解之 多Realm 之 Authorization
- cad文件怎么转为dxf格式?
- 几种css属性兼容性写法
- Android Studio 3.0更新项目报错处理方案
- jQuery语法
- PHP生成加减算法方式的验证码
- 使用@property 改变get和set