StrutsPrepareAndExecuteFilter的作用
来源:互联网 发布:最优化理论的实际应用 编辑:程序博客网 时间:2024/05/22 01:52
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的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用
- StrutsPrepareAndExecuteFilter的作用 Struts
- StrutsPrepareAndExecuteFilter的作用,和FilterDispatcher区别
- FilterDispatcher和StrutsPrepareAndExecuteFilter的作用及应用
- struts2 StrutsPrepareAndExecuteFilter作用及配置
- struts2的StrutsPrepareAndExecuteFilter
- StrutsPrepareAndExecuteFilter
- 360安全浏览器不支持base相对路径
- 回车直接实现点击某按钮的效果
- C中的概念 指针常量 常量指针 数组名
- 有一函数当x<0时,y=1.x>0时,y=3.x=0时,y=5.编程,输入x,输出y.
- javabean总结
- StrutsPrepareAndExecuteFilter的作用
- struts1使用select标签
- 开始使用Mac OS X——写给Mac新人
- vmime.NET 邮件收发类库 支持Smtp, Pop3, Imap,TLS and SSL
- php 实现求出两个文件的相对地址
- 约瑟夫问题
- 反射的用途
- ios 视频播放
- PrintWriter,FileOutputStream,FileInputStream