struts2
文章平均质量分 83
wangning_688
这个作者很懒,什么都没留下…
展开
-
struts2默认拦截器之alias
在struts2的struts-default.xml中定义了一个name为alias拦截器,实现类是com.opensymphony.xwork2.interceptor.AliasInterceptor,它的作用是给参数起一个别名,可用于在action链中以不同的名字共享同一个参数,也可用于把http请求参数以不同的名字映射到action里。拦截器有一个参数:al...2011-12-31 16:17:41 · 162 阅读 · 0 评论 -
struts2默认拦截器之autowiring
在struts2的struts-default.xml中定义了一个name为autowiring拦截器,实现类是com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInterceptor,它的作用是在struts2和spring整合时为action注入spring上下文ApplicationContext(Action需要实现...2011-12-31 16:30:18 · 92 阅读 · 0 评论 -
struts2默认拦截器之exception
在struts2的struts-default.xml中定义了一个name为exception拦截器,实现类是com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor,它的作用是对action中的异常进行处理(输出异常日志,与配置文件中的<exception-mapping/>匹配). 该拦截器有三个参...原创 2012-01-04 11:26:01 · 184 阅读 · 0 评论 -
struts2默认拦截器之servletConfig
在struts2的struts-default.xml中定义了一个name为servletConfig拦截器,实现类是org.apache.struts2.interceptor.ServletConfigInterceptor,该拦截器功能比较简单,作用是对实现了ServletRequestAware,ServletResponseAware,ParameterAware,Applicatio...2012-01-06 11:46:13 · 127 阅读 · 0 评论 -
struts2默认拦截器之i18n
在struts2的struts-default.xml中定义了一个name为i18n拦截器,实现类是com.opensymphony.xwork2.interceptor.I18nInterceptor,它的作用是根据用户请求设置session的语言环境。该拦截器有三个参数,parameterName,requestOnlyParameterName,attributeName;前两个是设置用户...2012-01-17 17:02:54 · 214 阅读 · 0 评论 -
struts2默认拦截器之chain
在struts2的struts-default.xml中定义了一个name为chain的拦截器,实现类是com.opensymphony.xwork2.interceptor.ChainingInterceptor。该拦截器主要是配合chain类型的result使用的,作用是将值栈中的各个对象的属性复制到当前执行的action对象中,那些实现了com.opensymphony.xwork2.Unc...2012-05-08 22:32:31 · 96 阅读 · 0 评论 -
struts2默认拦截器之prepare
在struts2的struts-default.xml中定义了一个name为prepare拦截器,实现类是com.opensymphony.xwork2.interceptor.PrepareInterceptor,它的作用是为实现了com.opensymphony.xwork2.Preparable接口的action调用相关方法。该拦截器有两个参数:alwaysInvokePrepare,fi...2012-02-02 11:26:13 · 100 阅读 · 0 评论