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将整个运行划分成若干同样类型的元素 ...
随机推荐
- linux如何安装xampp,以及融合dvwa
1.官网下载:https://www.apachefriends.org/download.html 2.赋予执行权限 [admin@19-56 ~]$ chmod +x xampp-linux-x6 ...
- kernel简介
内存管理 一般来看有三种类型的地址:物理地址.线性地址和逻辑地址,逻辑地址的精髓在于将地址分成两部分:段基地址+偏移,翻译的过程如下: 线性地址的精髓在于将所有的内存按照一定的大小分成了一页一页,对多 ...
- windowsclient开发--依据可下载url另存为文件(微信windowsclient这样做的)
能够我的blog的标题会让你误解,那么好,没图说了xx: 比方微信windowsclient发送了一张图片,我们能够预览这张图片,还能够保存到本地: 那么windows程序是怎样下载这张图片的呢? 是 ...
- DevExpress 15.1.sln
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio VisualStudioVersion = 14 ...
- BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第14章节--使用Office Services开发应用程序 新的机器翻译服务
BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第14章节--使用Office Services开发应用程序 新的机器翻译服务 机器翻译服务也是继Wor ...
- easyui required 提交验证
使用easyui时,对于提交验证,不不过在标签属性中加入data-options=required:true这句话这么来的.还须要另外加上才写东西能够把验证完整实现 1.设置from的属性 <f ...
- GCM与C2DM相比有什么不同
eoe介绍:http://wiki.eoe.cn/page/Migration.html 官方地址:http://developer.android.com/google/gcm/c2dm.html
- C#运用反射调用其他程序集中的代码
加载程序集 AssMedicalAdvice = Assembly.LoadFrom(Path.Combine(Environment.CurrentDirectory, "Inscript ...
- RelativeLayout经常使用属性介绍及实例解说
RelativeLayout是一种相对布局.控件的位置是依照相对位置来计算的.后一个控件在什么位置依赖于前一个控件的基本位置,是布局最经常使用,也是最灵活的一种布局. 下边来看一下他的经常使用属性 这 ...
- Jmeter-安装及配置(一)
Apache JMeter是Apache组织开发的基于Java的压力测试工具.用于对软件做压力测试,它最初被设计用于Web应用测试,但后来扩展到其他测试领域. 它可以用于测试静态和动态资源,例如静态文 ...