(Struts2学习篇) Struts2配置文件之 struts-default.xml
来源:互联网 发布:易我数据恢复向导v2.0 编辑:程序博客网 时间:2024/05/22 11:59
对struts-default.xml的一些注释
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"><struts><!-- package:是struts2框架底层提供出来的* name:用于让其他包来继承的* abstract:设置为抽象包,下面不能定义action标签 --> <package name="struts-default" abstract="true"> <!-- result-types:声明结果类型 * name:结果类型的名称 * class:结果类型对应类的完整路径 * default:设置其为默认,true是默认 --> <result-types> <!-- 转发到action --> <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult"/> <!-- 转发到jsp --> <result-type name="dispatcher" class="org.apache.struts2.dispatcher.ServletDispatcherResult" default="true"/> <result-type name="freemarker" class="org.apache.struts2.views.freemarker.FreemarkerResult"/> <result-type name="httpheader" class="org.apache.struts2.dispatcher.HttpHeaderResult"/> <!-- 重定向到jsp --> <result-type name="redirect" class="org.apache.struts2.dispatcher.ServletRedirectResult"/> <!-- 重定向到action --> <result-type name="redirectAction" class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/> <!-- 用于下载 --> <result-type name="stream" class="org.apache.struts2.dispatcher.StreamResult"/> <result-type name="velocity" class="org.apache.struts2.dispatcher.VelocityResult"/> <result-type name="xslt" class="org.apache.struts2.views.xslt.XSLTResult"/> <result-type name="plainText" class="org.apache.struts2.dispatcher.PlainTextResult" /> </result-types><!-- interceptors* interceptor:声明拦截器* name:拦截器的名称* class:对应拦截器类的完整路径 --> <interceptors> <interceptor name="alias" class="com.opensymphony.xwork2.interceptor.AliasInterceptor"/> <interceptor name="autowiring" class="com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInterceptor"/> <interceptor name="chain" class="com.opensymphony.xwork2.interceptor.ChainingInterceptor"/> <interceptor name="conversionError" class="org.apache.struts2.interceptor.StrutsConversionErrorInterceptor"/> <interceptor name="cookie" class="org.apache.struts2.interceptor.CookieInterceptor"/> <interceptor name="clearSession" class="org.apache.struts2.interceptor.ClearSessionInterceptor" /> <interceptor name="createSession" class="org.apache.struts2.interceptor.CreateSessionInterceptor" /> <interceptor name="debugging" class="org.apache.struts2.interceptor.debugging.DebuggingInterceptor" /> <interceptor name="execAndWait" class="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"/> <interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/> <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.ScopedModelDrivenInterceptor"/> <interceptor name="params" class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/> <interceptor name="actionMappingParams" class="org.apache.struts2.interceptor.ActionMappingParametersInteceptor"/> <interceptor name="prepare" class="com.opensymphony.xwork2.interceptor.PrepareInterceptor"/> <interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/> <interceptor name="scope" class="org.apache.struts2.interceptor.ScopeInterceptor"/> <interceptor name="servletConfig" class="org.apache.struts2.interceptor.ServletConfigInterceptor"/> <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.AnnotationValidationInterceptor"/> <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" /> <interceptor name="annotationWorkflow" class="com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor" /> <interceptor name="multiselect" class="org.apache.struts2.interceptor.MultiselectInterceptor" /> <!-- 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="multiselect"/> <interceptor-ref name="actionMappingParams"/> <interceptor-ref name="params"> <param name="excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*</param> </interceptor-ref> <interceptor-ref name="conversionError"/> </interceptor-stack> <!-- interceptor-stack:拦截器栈 * struts2框架通过使用拦截器栈,进而使用上面声明好的拦截器 * 在拦截器栈里面,存放了一些上面声明好的拦截器 * 拦截器栈相当于一个list集合,执行的时候是按照存放的先后顺序来执行 --> <interceptor-stack name="defaultStack"> <interceptor-ref name="exception"/> <interceptor-ref name="alias"/> <interceptor-ref name="servletConfig"/> <interceptor-ref name="i18n"/> <interceptor-ref name="prepare"/> <interceptor-ref name="chain"/> <interceptor-ref name="scopedModelDriven"/> <interceptor-ref name="modelDriven"/> <interceptor-ref name="fileUpload"/> <interceptor-ref name="checkbox"/> <interceptor-ref name="multiselect"/> <interceptor-ref name="staticParams"/> <interceptor-ref name="actionMappingParams"/> <interceptor-ref name="params"> <param name="excludeParams">dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*</param> </interceptor-ref> <interceptor-ref name="conversionError"/> <interceptor-ref name="validation"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="workflow"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="debugging"/> </interceptor-stack> </interceptors><!-- 配置在struts2框架运行时,默认要执行的是哪个拦截器栈,defaultStack --> <default-interceptor-ref name="defaultStack"/><!-- 配置在struts2框架运行时,如果没有为action指定class的话,默认要执行的class的类名 --> <default-class-ref class="com.opensymphony.xwork2.ActionSupport" /> </package></struts>
0 0
- (Struts2学习篇) Struts2配置文件之 struts-default.xml
- Struts2配置文件之struts-default.xml
- struts2 struts-default.xml 学习
- struts2默认配置文件 struts-default.xml 研究
- struts2默认配置文件 struts-default.xml 研究
- Struts2的默认配置文件:struts-default.xml
- struts2默认配置文件 struts-default.xml 研究
- struts2的默认配置文件struts-default.xml
- struts2(4)------struts-default.xml默认配置文件分析
- struts2 配置文件 struts.xml
- struts2配置文件 struts.xml
- SSH之struts2的配置文件 struts.xml
- 重温struts2之深入struts2配置文件struts.xml
- struts2 default.properties struts.properties struts.xml
- Struts2配置文件之default.properties
- Struts2.0配置文件(struts.xml)
- struts2 struts.xml配置文件详解
- Struts2配置文件Struts.xml示范
- UVa 119 - Greedy Gift Givers
- J2EE-JSplitPane分隔条箭头大小和位置调整
- 作为一个程序员,你的进步完全取决于你自己
- 一元多项式的相关操作
- 【算法拾遗】阶乘
- (Struts2学习篇) Struts2配置文件之 struts-default.xml
- ACdream 1083 有向无环图dp
- ubuntu 12.04 下安装tfpt和nfs服务器
- sh^M:bad interpreter:解决方法
- POJ 4081 Qin Shi Huang's National Road System
- HDU4081 Qin Shi Huang's National Road System【prim最小生成树+枚举】
- 打怪兽问题
- git cherry-pick. 如何把已经提交的commit, 从一个分支放到另一个分支
- 整合iOS和OS X将用户留在苹果的世界里