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将整个运行划分成若干同样类型的元素 ...
随机推荐
- Cesium 事件
1.相机事件(移动开始.移动结束等等) viewer.scene.camera.moveEnd.addEventListener(function(){ }): 2.鼠标事件(单击.移动.右键等) v ...
- 【docker】查看docker镜像的版本号TAG,从远程仓库拉取自己想要版本的镜像
要想查看镜像的版本好TAG,需要在docker hub查看 地址如下:https://hub.docker.com/r/library/ 进入之后,在页面左上角搜索框搜索, 例如搜索redis 搜索完 ...
- JS中的Math.pow(a,b)方法
定义和用法 pow() 方法可返回 x 的 y 次幂的值. 语法 Math.pow(x,y) 参数 描述 x 必需.底数.必须是数字. y 必需.幂数.必须是数字. 返回值 x 的 y 次幂. 说明 ...
- Echart学习
制表,展示好帮手,自己看官方文档吧,有示例和入门指导 参考:1.http://echarts.baidu.com/tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8% ...
- 后台SQL注入实例
简要描述: 汉庭连锁酒店后台SQL注入,可绕过登陆限制进入后台,可脱库. 详细说明: 问题发生在这个站点.http://miaosha.htinns.com/ 标题内没有写具体信息.因为怕发布后被人入 ...
- CentOS6.6下DRBD+HeartBeat+NFS配置
一.DRBD配置 Distributed Replicated Block Device(DRBD)是一个用软件实现的.无共享的.服务器之间镜像块设备内容的存储复制解决方案. 我们可以理解为它其实就是 ...
- 使用Nmon监控Linux的系统性能
Nmon(得名于 Nigel 的监控器)是IBM的员工 Nigel Griffiths 为 AIX 和 Linux 系统开发的一款计算机性能系统监控工具.Nmon 可以把操作系统的统计数据展示在屏幕上 ...
- Druid对比Impala/Shark
Druid 和 Impala Shark 的对比取决于产品要求, 取决于系统是设计成做什么的 Druid 被设计成 一直在线, 高可用性 实时插入数据 分片分块形式的任意查询据我所知 Im ...
- 利用github和git命令,将本地项目共享到服务器上
一.步骤 1. 创建项目根目录 mkdir 文件夹名 2. 初始化文件夹 git init 3. 配置用户名和邮箱(第一次配置后,不需要再登录) git config user.name 名字 git ...
- Android中Service概述
Service是Android中一种非常重要的组件,一般来说有两种用途:用Service执行长期执行的操作,而且与用户没有UI界面的交互:某个应用程序的Service能够被其它应用程序的组件调用以便提 ...