没有合适的资源?快使用搜索试试~ 我知道了~
Struts2默认拦截器解析.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 156 浏览量
2022-01-01
12:13:20
上传
评论
收藏 216KB PDF 举报
温馨提示
试读
12页
Struts2默认拦截器解析.pdf
资源推荐
资源详情
资源评论
Struts2 默认拦截器解析
使用 struts2,拦截器大家经常使用, 当然默认情况我们除了自定义的拦截器外, 会使用 struts2
默认的拦截器, 那他究竟有哪些默认的拦截器?每个拦截器都是做什么的呢?我们来看下对
应的源码,打开对应源码下的 struts2-default.xml 文件
我们可以看到对应很多的拦截器信息,如下
拦截器信息:
<interceptors >
<interceptor name ="alias"
class ="com.opensymphony.xwork2.interceptor.AliasInterceptor" />
<interceptor name ="autowiring"
class ="com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInt
erceptor" />
<interceptor name ="chain"
class ="com.opensymphony.xwork2.interceptor.ChainingInterceptor" />
<interceptor name ="conversionError"
class ="org.apache.struts2.interceptor.StrutsConversionErrorIntercepto
r" />
<interceptor name ="cookie"
class ="org.apache.struts2.interceptor.CookieInterceptor" />
<interceptor name ="createSession"
class ="org.apache.struts2.interceptor.CreateSessionInterceptor" />
<interceptor name ="debugging"
class ="org.apache.struts2.interceptor.debugging.DebuggingInterceptor"
/>
<interceptor name ="externalRef"
class ="com.opensymphony.xwork2.interceptor.ExternalReferencesIntercep
tor" />
<interceptor name ="execAndWait"
class ="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor" />
<interceptor name ="exception"
class ="com.opensymphony.xwork2.interceptor.ExceptionMappingIntercepto
r" />
<interceptor name ="fileUpload"
class ="org.apache.struts2.interceptor.FileUploadInterceptor" />
<interceptor name ="i18n"
class ="com.opensymphony.xwork2.interceptor.I18nInterceptor" />
<interceptor name ="logger"
class ="com.opensymphony.xwork2.interceptor.LoggingInterceptor" />
<interceptor name ="modelDriven"
class ="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor" />
<interceptor name ="scopedModelDriven"
class ="com.opensymphony.xwork2.interceptor.ScopedModelDrivenIntercept
or" />
<interceptor name ="params"
class ="com.opensymphony.xwork2.interceptor.ParametersInterceptor" />
<interceptor name ="prepare"
class ="com.opensymphony.xwork2.interceptor.PrepareInterceptor" />
<interceptor name ="staticParams"
class ="com.opensymphony.xwork2.interceptor.StaticParametersIntercepto
r" />
<interceptor name ="scope"
class ="org.apache.struts2.interceptor.ScopeInterceptor" />
<interceptor name ="servletConfig"
class ="org.apache.struts2.interceptor.ServletConfigInterceptor" />
<interceptor name ="sessionAutowiring"
class ="org.apache.struts2.spring.interceptor.SessionContextAutowiring
Interceptor" />
<interceptor name ="timer"
class ="com.opensymphony.xwork2.interceptor.TimerInterceptor" />
<interceptor name ="token"
class ="org.apache.struts2.interceptor.TokenInterceptor" />
<interceptor name ="tokenSession"
class ="org.apache.struts2.interceptor.TokenSessionStoreInterceptor" />
<interceptor name ="validation"
class ="org.apache.struts2.interceptor.validation.AnnotationValidation
Interceptor" />
<interceptor name ="workflow"
class ="com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor
" />
<interceptor name ="store"
class ="org.apache.struts2.interceptor.MessageStoreInterceptor" />
<interceptor name ="checkbox"
class ="org.apache.struts2.interceptor.CheckboxInterceptor" />
<interceptor name ="profiling"
class ="org.apache.struts2.interceptor.ProfilingActivationInterceptor"
/>
<interceptor name ="roles"
class ="org.apache.struts2.interceptor.RolesInterceptor" />
<!-- Deprecated name forms scheduled for removal in Struts 2.1.0. The
camelCase versions are preferred. See ww-1707 -->
<interceptor name ="external-ref"
class ="com.opensymphony.xwork2.interceptor.ExternalReferencesIntercep
tor" />
<interceptor name ="model-driven"
class ="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor" />
<interceptor name ="static-params"
class ="com.opensymphony.xwork2.interceptor.StaticParametersIntercepto
r" />
<interceptor name ="scoped-model-driven"
class ="com.opensymphony.xwork2.interceptor.ScopedModelDrivenIntercept
or" />
<interceptor name ="servlet-config"
class ="org.apache.struts2.interceptor.ServletConfigInterceptor" />
<interceptor name ="token-session"
class ="org.apache.struts2.interceptor.TokenSessionStoreInterceptor" />
拦截器栈信息:
<!-- Basic stack -->
<interceptor-stack name ="basicStack" >
<interceptor-ref name ="exception" />
<interceptor-ref name ="servletConfig" />
<interceptor-ref name ="prepare" />
<interceptor-ref name ="checkbox" />
<interceptor-ref name ="params" />
<interceptor-ref name ="conversionError" />
</ interceptor-stack >
<!-- Sample validation and workflow stack -->
<interceptor-stack name ="validationWorkflowStack" >
<interceptor-ref name ="basicStack" />
<interceptor-ref name ="validation" />
<interceptor-ref name ="workflow" />
</ interceptor-stack >
<!-- Sample file upload stack -->
剩余11页未读,继续阅读
资源评论
BlueWatergg
- 粉丝: 3
- 资源: 11万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功