Struts2框架拦截器:
Struts 2框架提供了良好的预配置,并准备使用的盒拦截。下面列出了几个重要的拦截器:
| SN | Interceptor & 描述 |
|---|---|
| 1 | alias Allows parameters to have different name aliases across requests. |
| 2 | checkbox Assists in managing check boxes by adding a parameter value of false for check boxes that are not checked. |
| 3 | conversionError Places error information from converting strings to parameter types into the action's field errors. |
| 4 | createSession Automatically creates an HTTP session if one does not already exist. |
| 5 | debugging Provides several different debugging screens to the developer. |
| 6 | execAndWait Sends the user to an intermediary waiting page while the action executes in the background. |
| 7 | exception Maps exceptions that are thrown from an action to a result, allowing automatic exception handling via redirection. |
| 8 | fileUpload Facilitates easy file uploading. |
| 9 | i18n Keeps track of the selected locale during a user's session. |
| 10 | logger Provides simple logging by outputting the name of the action being executed. |
| 11 | params Sets the request parameters on the action. |
| 12 | prepare This is typically used to do pre-processing work, such as setup database connections. |
| 13 | profile Allows simple profiling information to be logged for actions. |
| 14 | scope Stores and retrieves the action's state in the session or application scope. |
| 15 | ServletConfig Provides the action with access to various servlet-based information. |
| 16 | timer Provides simple profiling information in the form of how long the action takes to execute. |
| 17 | token Checks the action for a valid token to prevent duplicate formsubmission. |
| 18 | validation Provides validation support for actions |
完整的细节上面提到的拦截,请loook到Struts2文档。但我会告诉你如何使用拦截器,一般在你的Struts应用程序。
Struts2框架拦截器:的更多相关文章
- JavaWeb_(Struts2框架)拦截器interceptor
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- (六)Struts2的拦截器
一.简介 拦截器体系是struts2重要的组成部分.正是大量的内建拦截器完成了该框架的大部分操作. 比如params拦截器将请求参数解析出来,设置Action的属性.servletConfig拦截器负 ...
- JavaWeb框架_Struts2_(三)---->Struts2的拦截器
2. Struts2的拦截器(使用拦截器实现权限控制) 2.1 拦截器的概述 拦截器是Struts2的核心组成部分,它可以动态的拦截Action调用的对象,类似与Servlet中的过滤器.Struts ...
- 简单理解Struts2中拦截器与过滤器的区别及执行顺序
简单理解Struts2中拦截器与过滤器的区别及执行顺序 当接收到一个httprequest , a) 当外部的httpservletrequest到来时 b) 初始到了servlet容器 传递给一个标 ...
- struts2总结六: Struts2的拦截器
一.Struts2的系统结构图
- struts2之拦截器
1. 为什么需要拦截器 早期MVC框架将一些通用操作写死在核心控制器中,致使框架灵活性不足.可扩展性降低, Struts 2将核心功能放到多个拦截器中实现,拦截器可自由选择和组合,增强了灵活性,有利于 ...
- Struts2【拦截器】就是这么简单
什么是拦截器 拦截器Interceptor.....拦截器是Struts的概念,它与过滤器是类似的...可以近似于看作是过滤器 为什么我们要使用拦截器 前面在介绍Struts的时候已经讲解过了,Str ...
- (转)Struts2的拦截器
http://blog.csdn.net/yerenyuan_pku/article/details/68648101 Struts2的拦截器 拦截器的概述 拦截器,在AOP(Aspect-Orien ...
- 【跟我一步一步学Struts2】——拦截器
前言 前面提到过拦截器.而且说拦截器仅仅能拦截Action.这里拦截器的调用体现了责任链模式.为什么说体现了责任链模式呢? 以下的一段话说的非常明确: Struts2将整个运行划分成若干同样类型的元素 ...
随机推荐
- [转] matlab获取时间日期
原文:EmanLee, Eman Lee's Space (blog, website) 在MATLAB中得到系统当前日期.时间也是经常用到的内容,由以下函数实现. 1.生成指定格式日期和时间 dat ...
- 【Git】GitHub for Windows使用(2) 分支
目录 1.回看客户端相关功能 2.新建一个分支 3.在新分支上修改文件 4.上传新建分支上的修改,并合并分支 5.删除分支 1.回看客户端相关功能 看看设置中的以下内容 2.新建一个分支 3.在新分支 ...
- Android ProgressBar手动控制开始和停止
这两天有个需求,点击按钮从SD卡解压压缩包,并读取压缩包内txt文档内容,然后在街面上显示出来.毕竟IO操作很耗时,如果文件较大会花费不少时间.所以,在处理数据的时候能给个进度就好了.我们通常的做法就 ...
- Android线程与线程池
引言 在Android中,几乎完全采用了Java中的线程机制.线程是最小的调度单位,在很多情况下为了使APP更加流程地运行,我们不可能将很多事情都放在主线程上执行,这样会造成严重卡顿(ANR),那么这 ...
- js各种验证总结
1.邮箱验证 function isEmail(str){ var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1 ...
- ODATA4 及实现
ODATA4 的JAVASCRIPT 实现: http://jaydata.org/ ODATA4 的JAVA 项目 Apache Olingo:http://olingo.incubato ...
- CreatarGlobe实现多机立体显示方案(初稿)
CreatarGlobe实现多机立体显示方案(初稿) 关键字 : 集群渲染 立体显示 大屏幕 边缘融合 多机同步 多机同步显示 关键字: 大屏幕投影融合系统解决方案 集群渲染 多机3D同步显示又称“集 ...
- Private strand flush not complete错误
Private strand flush not complete错误 (2013-10-22 11:04:58) 转载▼ 分类: FAQ 最近的一个报表系统数据库,总是出现checkpoint ...
- 64位系统注冊32位的directshow filter文件
在SERVER2008上注冊自己写的directshow filter 的dll或者ax文件的时候总是提示 [Window Title] RegSvr32 [Content] 模块".\ba ...
- HTTP——请求和响应格式
HTTP请求格式:<request-line><headers><blank line>[<request-body>]说明:第一行必须是一个请求行(r ...