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将整个运行划分成若干同样类型的元素 ...
随机推荐
- Nice Messager隐私权政策
重视用户的隐私.您在使用我们的服务时,我们可能会收集和使用您的相关信息.我们希望通过本<隐私政策>向您说明,在使用我们的服务时,我们如何收集.使用.储存和分享这些信息,以及我们为您提供的访 ...
- Texygen文本生成,交大计算机系14级的朱耀明
文本生成哪家强?上交大提出基准测试新平台 Texygen 2018-02-12 13:11测评 新智元报道 来源:arxiv 编译:Marvin [新智元导读]上海交通大学.伦敦大学学院朱耀明, 卢思 ...
- python的 json.dumps 中文编码
python的 json.dumps 中文编码 # -- coding: utf-8 -- 的作用:文件内容以utf-8编码 json.dumps 序列化时对中文默认使用的ascii编码, print ...
- CSS的伪元素和伪类
css3为了区分伪类和伪元素,伪元素采用双冒号写法. 常见伪类—— :hover, :active, :visited, :focus. 常见伪元素——::first-letter,::first-l ...
- javascript快速入门12--函数式与面向对象
函数 函数是一组可以随时随地运行的语句. 函数是 ECMAScript 的核心. 创建函数 function fnOne() {//具有名称的函数,函数名必须符合变量名命名规范 //可以没有符何语句 ...
- maven 插件之 AutoConfig 工具使用笔记
AutoConfig 是一款 maven 插件,主要用于 Maven 项目打包使用.在我们的工作中,会将自己写的代码打成 jar 包或者 war 包发布到各种环境上.一般地,不用的环境所使用的数据库. ...
- rails generate model/resource/scaffold的区别
If you’re just learning Ruby on Rails, you may be confused as to when to generate individual models, ...
- 倍福TwinCAT(贝福Beckhoff)常见问题(FAQ)-人机界面如何快速调整大量控件的位置
打开元素列表,然后直接从顶部按住Shift批量选中控件即可 更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku.com/acetaohai123 我的 ...
- Template design pattern application in android
The template method allow separate the generic method from a detail context(class) via inheritance A ...
- Linux 后台开发常用命令
1.automake编译 autoreconf -isv ./configure make 2.远程获取代码 rsync -aPvr --exclude=*/log/* *.*.*.*::home/s ...