Struts2拦截器说明

来源:互联网 发布:阿里云rds价格 编辑:程序博客网 时间:2024/05/29 14:27

Alias Interceptor(别名拦截):类似转换参数,可能被命名为不同的请求。

 

Chaining Interceptor(链接拦截):使前一个动作属性可用户当前属性,常用连同<result  type="chain">(前面的动作)

 

checkbox  Interceptor(复选框拦截):添加了自动处理代码来检测未被选中的复选框并添加了一个默认的(通常是“假”)值参数,     用隐藏字段来检测未提交的复选框,默认是选中non-boolean.值复选框重写

 

Cookie Interceptor(cookie拦截器):注入cookie,具有一定配置名称/值转化为action

 

conversionError Interceptor(转换错误拦截):添加来自action领域错误的ActionContext的转换错误

 

Create Session Interceptor(创建会话拦截):自动创建一个HttpSession,某些拦截器用于需要一个HttpSession正常工作(如TokenInterceptor)

 

Debugging Interceptor(调试拦截):提供多种不同调试屏幕,以提供后面页面的检测能力

 

Execute and wait Interceptor(执行和等待拦截):在后台执行Action,当发送给用户时,有一个中间等待页面

 

Exception Interceptor(异常拦截):Maps Exception to a result.

 

File upload Interceptor(文件上传拦截):一个让用户简单访问上传文件的拦截器

 

I18n Interceptor(国际化拦截):记录用户会话中使用的语言环境。

 

Logger Interceptor(记录器拦截):输出Action的名称

 

Message Store Interceptor(消息存储拦截):实现session的ValidationAware接口时,在Action存储和检索 Action消息/错误/域错误

 

Model Driver Interceptor(模型驱动拦截):假如Action实现了ModelDriver,把获得的getModel结果推到值栈里

 

Scope Model Driver Interceptor(范围模型驱动拦截):如果Action实现了ScopedModelDriver,拦截器从一个范围检索和存储模型,在Action设置它称为setModel

 

Parameter Interceptor(参数拦截):Action中设置请求参数

 

 

 

 

原创粉丝点击