struts2-core-2.3.20.jar

核心配置位于该jar

struts-default.xml

struts-2.3.dtd

  1 <?xml version="1.0" encoding="UTF-8" ?>
  2 <!--
  3 /*
  4  * $Id$
  5  *
  6  * Licensed to the Apache Software Foundation (ASF) under one
  7  * or more contributor license agreements.  See the NOTICE file
  8  * distributed with this work for additional information
  9  * regarding copyright ownership.  The ASF licenses this file
 10  * to you under the Apache License, Version 2.0 (the
 11  * "License"); you may not use this file except in compliance
 12  * with the License.  You may obtain a copy of the License at
 13  *
 14  *  http://www.apache.org/licenses/LICENSE-2.0
 15  *
 16  * Unless required by applicable law or agreed to in writing,
 17  * software distributed under the License is distributed on an
 18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 19  * KIND, either express or implied.  See the License for the
 20  * specific language governing permissions and limitations
 21  * under the License.
 22  */
 23 -->
 24
 25 <!--
 26     When declaring beans in this file you must either use name="struts" or don‘t name the bean at all.
 27
 28     The name="struts" must be used when alias was defined in {@link org.apache.struts2.config.DefaultBeanSelectionProvider} -
 29     it is then the default bean‘s name and {@link org.apache.struts2.config.DefaultBeanSelectionProvider} links name "struts"
 30     with "default" (aliasing it)
 31
 32     If name won‘t be defined then the "default" value will be used {@link com.opensymphony.xwork2.inject.Container#DEFAULT_NAME}
 33     and {@link com.opensymphony.xwork2.inject.Inject}
 34 -->
 35 <!DOCTYPE struts PUBLIC
 36     "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
 37     "http://struts.apache.org/dtds/struts-2.3.dtd">
 38
 39 <struts>
 40
 41     <constant name="struts.excludedClasses"
 42               value="
 43                 java.lang.Object,
 44                 java.lang.Runtime,
 45                 java.lang.System,
 46                 java.lang.Class,
 47                 java.lang.ClassLoader,
 48                 java.lang.Shutdown,
 49                 ognl.OgnlContext,
 50                 ognl.MemberAccess,
 51                 ognl.ClassResolver,
 52                 ognl.TypeConverter,
 53                 com.opensymphony.xwork2.ActionContext" />
 54     <!-- this must be valid regex, each ‘.‘ in package name must be escaped! -->
 55     <constant name="struts.excludedPackageNamePatterns" value="^java\.lang\..*,^ognl.*,^javax.*" />
 56
 57     <bean class="com.opensymphony.xwork2.ObjectFactory" name="struts"/>
 58     <bean type="com.opensymphony.xwork2.factory.ResultFactory" name="struts" class="org.apache.struts2.factory.StrutsResultFactory" />
 59     <bean type="com.opensymphony.xwork2.factory.ActionFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultActionFactory" />
 60     <bean type="com.opensymphony.xwork2.factory.ConverterFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultConverterFactory" />
 61     <bean type="com.opensymphony.xwork2.factory.InterceptorFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultInterceptorFactory" />
 62     <bean type="com.opensymphony.xwork2.factory.ValidatorFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultValidatorFactory" />
 63     <bean type="com.opensymphony.xwork2.factory.UnknownHandlerFactory" name="struts" class="com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory" />
 64
 65     <bean type="com.opensymphony.xwork2.FileManager" class="com.opensymphony.xwork2.util.fs.DefaultFileManager" name="system" scope="singleton"/>
 66     <bean type="com.opensymphony.xwork2.FileManagerFactory" class="com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory" name="struts" scope="singleton"/>
 67
 68     <bean type="com.opensymphony.xwork2.ActionProxyFactory" name="struts" class="org.apache.struts2.impl.StrutsActionProxyFactory"/>
 69     <bean type="com.opensymphony.xwork2.ActionProxyFactory" name="prefix" class="org.apache.struts2.impl.PrefixBasedActionProxyFactory"/>
 70
 71     <bean type="com.opensymphony.xwork2.conversion.ObjectTypeDeterminer" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer"/>
 72
 73     <bean type="com.opensymphony.xwork2.util.PatternMatcher" name="struts" class="com.opensymphony.xwork2.util.WildcardHelper" />
 74     <bean type="com.opensymphony.xwork2.util.PatternMatcher" name="namedVariable" class="com.opensymphony.xwork2.util.NamedVariablePatternMatcher"/>
 75     <bean type="com.opensymphony.xwork2.util.PatternMatcher" name="regex" class="org.apache.struts2.util.RegexPatternMatcher"/>
 76
 77     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="struts" class="org.apache.struts2.dispatcher.mapper.DefaultActionMapper" />
 78     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="composite" class="org.apache.struts2.dispatcher.mapper.CompositeActionMapper" />
 79     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="restful" class="org.apache.struts2.dispatcher.mapper.RestfulActionMapper" />
 80     <bean type="org.apache.struts2.dispatcher.mapper.ActionMapper" name="restful2" class="org.apache.struts2.dispatcher.mapper.Restful2ActionMapper" />
 81
 82     <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="jakarta" class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest" scope="default"/>
 83     <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="jakarta-stream" class="org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest" scope="default"/>
 84
 85     <bean type="org.apache.struts2.views.TagLibraryDirectiveProvider" name="s" class="org.apache.struts2.views.DefaultTagLibrary" />
 86     <bean type="org.apache.struts2.views.TagLibraryModelProvider" name="s" class="org.apache.struts2.views.DefaultTagLibrary" />
 87
 88     <bean class="org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader" />
 89     <bean class="org.apache.struts2.views.freemarker.FreemarkerManager" name="struts" />
 90     <bean class="org.apache.struts2.views.velocity.VelocityManager" name="struts" optional="true" />
 91
 92     <bean class="org.apache.struts2.components.template.TemplateEngineManager" />
 93     <bean type="org.apache.struts2.components.template.TemplateEngine" name="ftl" class="org.apache.struts2.components.template.FreemarkerTemplateEngine" />
 94     <bean type="org.apache.struts2.components.template.TemplateEngine" name="vm" class="org.apache.struts2.components.template.VelocityTemplateEngine" />
 95     <bean type="org.apache.struts2.components.template.TemplateEngine" name="jsp" class="org.apache.struts2.components.template.JspTemplateEngine" />
 96
 97     <bean type="com.opensymphony.xwork2.conversion.impl.XWorkConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.XWorkConverter" />
 98
 99     <bean type="com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor" />
100     <bean type="com.opensymphony.xwork2.conversion.ConversionFileProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor" />
101     <bean type="com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor" />
102     <bean type="com.opensymphony.xwork2.conversion.TypeConverterCreator" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterCreator" />
103     <bean type="com.opensymphony.xwork2.conversion.TypeConverterHolder" name="struts" class="com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterHolder" />
104
105     <bean class="com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter" />
106
107     <bean type="com.opensymphony.xwork2.conversion.impl.CollectionConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.CollectionConverter" scope="singleton"/>
108     <bean type="com.opensymphony.xwork2.conversion.impl.ArrayConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.ArrayConverter" scope="singleton"/>
109     <bean type="com.opensymphony.xwork2.conversion.impl.DateConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.DateConverter" scope="singleton"/>
110     <bean type="com.opensymphony.xwork2.conversion.impl.NumberConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.NumberConverter" scope="singleton"/>
111     <bean type="com.opensymphony.xwork2.conversion.impl.StringConverter" name="struts" class="com.opensymphony.xwork2.conversion.impl.StringConverter" scope="singleton"/>
112
113     <bean type="com.opensymphony.xwork2.TextProvider" name="struts" class="com.opensymphony.xwork2.TextProviderSupport" scope="default" />
114     <bean type="com.opensymphony.xwork2.LocaleProvider" name="struts" class="com.opensymphony.xwork2.DefaultLocaleProvider" scope="singleton" />
115
116     <bean type="org.apache.struts2.components.UrlRenderer" name="struts" class="org.apache.struts2.components.ServletUrlRenderer"/>
117     <bean type="org.apache.struts2.views.util.UrlHelper" name="struts" class="org.apache.struts2.views.util.DefaultUrlHelper"/>
118
119     <bean type="com.opensymphony.xwork2.util.ValueStackFactory" name="struts" class="com.opensymphony.xwork2.ognl.OgnlValueStackFactory" />
120     <bean type="com.opensymphony.xwork2.util.reflection.ReflectionProvider" name="struts" class="com.opensymphony.xwork2.ognl.OgnlReflectionProvider" />
121     <bean type="com.opensymphony.xwork2.util.reflection.ReflectionContextFactory" name="struts" class="com.opensymphony.xwork2.ognl.OgnlReflectionContextFactory" />
122
123     <bean type="com.opensymphony.xwork2.TextProvider" name="system" class="com.opensymphony.xwork2.DefaultTextProvider" />
124     <bean type="com.opensymphony.xwork2.conversion.NullHandler" name="java.lang.Object" class="com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler" />
125
126     <bean type="com.opensymphony.xwork2.validator.ActionValidatorManager" name="struts" class="com.opensymphony.xwork2.validator.AnnotationActionValidatorManager" />
127     <bean type="com.opensymphony.xwork2.validator.ActionValidatorManager" name="no-annotations" class="com.opensymphony.xwork2.validator.DefaultActionValidatorManager" />
128
129     <bean type="com.opensymphony.xwork2.validator.ValidatorFactory" class="com.opensymphony.xwork2.validator.DefaultValidatorFactory"/>
130     <bean type="com.opensymphony.xwork2.validator.ValidatorFileParser" class="com.opensymphony.xwork2.validator.DefaultValidatorFileParser" />
131
132     <bean class="com.opensymphony.xwork2.ognl.OgnlUtil" />
133
134     <bean type="com.opensymphony.xwork2.util.TextParser" name="struts" class="com.opensymphony.xwork2.util.OgnlTextParser" scope="singleton"/>
135
136     <bean type="ognl.PropertyAccessor" name="com.opensymphony.xwork2.util.CompoundRoot" class="com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor" />
137     <bean type="ognl.PropertyAccessor" name="java.lang.Object" class="com.opensymphony.xwork2.ognl.accessor.ObjectAccessor" />
138     <bean type="ognl.PropertyAccessor" name="java.util.Iterator" class="com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor" />
139     <bean type="ognl.PropertyAccessor" name="java.util.Enumeration" class="com.opensymphony.xwork2.ognl.accessor.XWorkEnumerationAccessor" />
140     <bean type="ognl.PropertyAccessor" name="java.util.List" class="com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor" />
141     <bean type="ognl.PropertyAccessor" name="java.util.Set" class="com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor" />
142     <bean type="ognl.PropertyAccessor" name="java.util.Map" class="com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor" />
143     <bean type="ognl.PropertyAccessor" name="java.util.Collection" class="com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor" />
144     <bean type="ognl.PropertyAccessor" name="com.opensymphony.xwork2.ognl.ObjectProxy" class="com.opensymphony.xwork2.ognl.accessor.ObjectProxyPropertyAccessor" />
145
146     <bean type="ognl.MethodAccessor" name="java.lang.Object" class="com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor" />
147     <bean type="ognl.MethodAccessor" name="com.opensymphony.xwork2.util.CompoundRoot" class="com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor" />
148
149     <bean class="org.apache.struts2.views.jsp.ui.OgnlTool" />
150
151     <bean type="org.apache.struts2.dispatcher.StaticContentLoader" class="org.apache.struts2.dispatcher.DefaultStaticContentLoader" name="struts" />
152     <bean type="com.opensymphony.xwork2.UnknownHandlerManager" class="com.opensymphony.xwork2.DefaultUnknownHandlerManager" name="struts" />
153
154     <bean type="org.apache.struts2.dispatcher.DispatcherErrorHandler" name="struts" class="org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler" />
155
156     <constant name="struts.dispatcher.errorHandler" value="struts" />
157
158     <!--  Silly workarounds for OGNL since there is currently no way to flush its internal caches -->
159     <bean type="ognl.PropertyAccessor" name="java.util.ArrayList" class="com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor" />
160     <bean type="ognl.PropertyAccessor" name="java.util.HashSet" class="com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor" />
161     <bean type="ognl.PropertyAccessor" name="java.util.HashMap" class="com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor" />
162
163     <bean type="com.opensymphony.xwork2.security.ExcludedPatternsChecker" name="struts" class="com.opensymphony.xwork2.security.DefaultExcludedPatternsChecker" scope="default" />
164     <bean type="com.opensymphony.xwork2.security.AcceptedPatternsChecker" name="struts" class="com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker" scope="default" />
165
166     <package name="struts-default" abstract="true">
167         <result-types>
168             <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult"/>
169             <result-type name="dispatcher" class="org.apache.struts2.dispatcher.ServletDispatcherResult" default="true"/>
170             <result-type name="freemarker" class="org.apache.struts2.views.freemarker.FreemarkerResult"/>
171             <result-type name="httpheader" class="org.apache.struts2.dispatcher.HttpHeaderResult"/>
172             <result-type name="redirect" class="org.apache.struts2.dispatcher.ServletRedirectResult"/>
173             <result-type name="redirectAction" class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/>
174             <result-type name="stream" class="org.apache.struts2.dispatcher.StreamResult"/>
175             <result-type name="velocity" class="org.apache.struts2.dispatcher.VelocityResult"/>
176             <result-type name="xslt" class="org.apache.struts2.views.xslt.XSLTResult"/>
177             <result-type name="plainText" class="org.apache.struts2.dispatcher.PlainTextResult" />
178             <result-type name="postback" class="org.apache.struts2.dispatcher.PostbackResult" />
179         </result-types>
180
181         <interceptors>
182             <interceptor name="alias" class="com.opensymphony.xwork2.interceptor.AliasInterceptor"/>
183             <interceptor name="autowiring" class="com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInterceptor"/>
184             <interceptor name="chain" class="com.opensymphony.xwork2.interceptor.ChainingInterceptor"/>
185             <interceptor name="conversionError" class="org.apache.struts2.interceptor.StrutsConversionErrorInterceptor"/>
186             <interceptor name="cookie" class="org.apache.struts2.interceptor.CookieInterceptor"/>
187             <interceptor name="cookieProvider" class="org.apache.struts2.interceptor.CookieProviderInterceptor"/>
188             <interceptor name="clearSession" class="org.apache.struts2.interceptor.ClearSessionInterceptor" />
189             <interceptor name="createSession" class="org.apache.struts2.interceptor.CreateSessionInterceptor" />
190             <interceptor name="debugging" class="org.apache.struts2.interceptor.debugging.DebuggingInterceptor" />
191             <interceptor name="execAndWait" class="org.apache.struts2.interceptor.ExecuteAndWaitInterceptor"/>
192             <interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
193             <interceptor name="fileUpload" class="org.apache.struts2.interceptor.FileUploadInterceptor"/>
194             <interceptor name="i18n" class="com.opensymphony.xwork2.interceptor.I18nInterceptor"/>
195             <interceptor name="logger" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
196             <interceptor name="modelDriven" class="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor"/>
197             <interceptor name="scopedModelDriven" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"/>
198             <interceptor name="params" class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>
199             <interceptor name="actionMappingParams" class="org.apache.struts2.interceptor.ActionMappingParametersInteceptor"/>
200             <interceptor name="prepare" class="com.opensymphony.xwork2.interceptor.PrepareInterceptor"/>
201             <interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
202             <interceptor name="scope" class="org.apache.struts2.interceptor.ScopeInterceptor"/>
203             <interceptor name="servletConfig" class="org.apache.struts2.interceptor.ServletConfigInterceptor"/>
204             <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
205             <interceptor name="token" class="org.apache.struts2.interceptor.TokenInterceptor"/>
206             <interceptor name="tokenSession" class="org.apache.struts2.interceptor.TokenSessionStoreInterceptor"/>
207             <interceptor name="validation" class="org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor"/>
208             <interceptor name="workflow" class="com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor"/>
209             <interceptor name="store" class="org.apache.struts2.interceptor.MessageStoreInterceptor" />
210             <interceptor name="checkbox" class="org.apache.struts2.interceptor.CheckboxInterceptor" />
211             <interceptor name="datetime" class="org.apache.struts2.interceptor.DateTextFieldInterceptor" />
212             <interceptor name="profiling" class="org.apache.struts2.interceptor.ProfilingActivationInterceptor" />
213             <interceptor name="roles" class="org.apache.struts2.interceptor.RolesInterceptor" />
214             <interceptor name="annotationWorkflow" class="com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor" />
215             <interceptor name="multiselect" class="org.apache.struts2.interceptor.MultiselectInterceptor" />
216             <interceptor name="deprecation" class="org.apache.struts2.interceptor.DeprecationInterceptor" />
217
218             <!-- Basic stack -->
219             <interceptor-stack name="basicStack">
220                 <interceptor-ref name="exception"/>
221                 <interceptor-ref name="servletConfig"/>
222                 <interceptor-ref name="prepare"/>
223                 <interceptor-ref name="checkbox"/>
224                 <interceptor-ref name="datetime"/>
225                 <interceptor-ref name="multiselect"/>
226                 <interceptor-ref name="actionMappingParams"/>
227                 <interceptor-ref name="params">
228                     <param name="excludeParams">^action:.*,^method:.*</param>
229                 </interceptor-ref>
230                 <interceptor-ref name="conversionError"/>
231                 <interceptor-ref name="deprecation"/>
232             </interceptor-stack>
233
234             <!-- Sample validation and workflow stack -->
235             <interceptor-stack name="validationWorkflowStack">
236                 <interceptor-ref name="basicStack"/>
237                 <interceptor-ref name="validation"/>
238                 <interceptor-ref name="workflow"/>
239             </interceptor-stack>
240
241             <!-- Sample file upload stack -->
242             <interceptor-stack name="fileUploadStack">
243                 <interceptor-ref name="fileUpload"/>
244                 <interceptor-ref name="basicStack"/>
245             </interceptor-stack>
246
247             <!-- Sample model-driven stack  -->
248             <interceptor-stack name="modelDrivenStack">
249                 <interceptor-ref name="modelDriven"/>
250                 <interceptor-ref name="basicStack"/>
251             </interceptor-stack>
252
253             <!-- Sample action chaining stack -->
254             <interceptor-stack name="chainStack">
255                 <interceptor-ref name="chain"/>
256                 <interceptor-ref name="basicStack"/>
257             </interceptor-stack>
258
259             <!-- Sample i18n stack -->
260             <interceptor-stack name="i18nStack">
261                 <interceptor-ref name="i18n"/>
262                 <interceptor-ref name="basicStack"/>
263             </interceptor-stack>
264
265             <!-- An example of the paramsPrepareParams trick. This stack
266                  is exactly the same as the defaultStack, except that it
267                  includes one extra interceptor before the prepare interceptor:
268                  the params interceptor.
269
270                  This is useful for when you wish to apply parameters directly
271                  to an object that you wish to load externally (such as a DAO
272                  or database or service layer), but can‘t load that object
273                  until at least the ID parameter has been loaded. By loading
274                  the parameters twice, you can retrieve the object in the
275                  prepare() method, allowing the second params interceptor to
276                  apply the values on the object. -->
277             <interceptor-stack name="paramsPrepareParamsStack">
278                 <interceptor-ref name="exception"/>
279                 <interceptor-ref name="alias"/>
280                 <interceptor-ref name="i18n"/>
281                 <interceptor-ref name="checkbox"/>
282                 <interceptor-ref name="datetime"/>
283                 <interceptor-ref name="multiselect"/>
284                 <interceptor-ref name="params">
285                     <param name="excludeParams">^action:.*,^method:.*</param>
286                 </interceptor-ref>
287                 <interceptor-ref name="servletConfig"/>
288                 <interceptor-ref name="prepare"/>
289                 <interceptor-ref name="chain"/>
290                 <interceptor-ref name="modelDriven"/>
291                 <interceptor-ref name="fileUpload"/>
292                 <interceptor-ref name="staticParams"/>
293                 <interceptor-ref name="actionMappingParams"/>
294                 <interceptor-ref name="params">
295                     <param name="excludeParams">^action:.*,^method:.*</param>
296                 </interceptor-ref>
297                 <interceptor-ref name="conversionError"/>
298                 <interceptor-ref name="validation">
299                     <param name="excludeMethods">input,back,cancel,browse</param>
300                 </interceptor-ref>
301                 <interceptor-ref name="workflow">
302                     <param name="excludeMethods">input,back,cancel,browse</param>
303                 </interceptor-ref>
304             </interceptor-stack>
305
306             <!-- A complete stack with all the common interceptors in place.
307                  Generally, this stack should be the one you use, though it
308                  may do more than you need. Also, the ordering can be
309                  switched around (ex: if you wish to have your servlet-related
310                  objects applied before prepare() is called, you‘d need to move
311                  servletConfig interceptor up.
312
313                  This stack also excludes from the normal validation and workflow
314                  the method names input, back, and cancel. These typically are
315                  associated with requests that should not be validated.
316                  -->
317             <interceptor-stack name="defaultStack">
318                 <interceptor-ref name="exception"/>
319                 <interceptor-ref name="alias"/>
320                 <interceptor-ref name="servletConfig"/>
321                 <interceptor-ref name="i18n"/>
322                 <interceptor-ref name="prepare"/>
323                 <interceptor-ref name="chain"/>
324                 <interceptor-ref name="scopedModelDriven"/>
325                 <interceptor-ref name="modelDriven"/>
326                 <interceptor-ref name="fileUpload"/>
327                 <interceptor-ref name="checkbox"/>
328                 <interceptor-ref name="datetime"/>
329                 <interceptor-ref name="multiselect"/>
330                 <interceptor-ref name="staticParams"/>
331                 <interceptor-ref name="actionMappingParams"/>
332                 <interceptor-ref name="params">
333                     <param name="excludeParams">^action:.*,^method:.*</param>
334                 </interceptor-ref>
335                 <interceptor-ref name="conversionError"/>
336                 <interceptor-ref name="validation">
337                     <param name="excludeMethods">input,back,cancel,browse</param>
338                 </interceptor-ref>
339                 <interceptor-ref name="workflow">
340                     <param name="excludeMethods">input,back,cancel,browse</param>
341                 </interceptor-ref>
342                 <interceptor-ref name="debugging"/>
343                 <interceptor-ref name="deprecation"/>
344             </interceptor-stack>
345
346             <!-- The completeStack is here for backwards compatibility for
347                  applications that still refer to the defaultStack by the
348                  old name -->
349             <interceptor-stack name="completeStack">
350                 <interceptor-ref name="defaultStack"/>
351             </interceptor-stack>
352
353             <!-- Sample execute and wait stack.
354                  Note: execAndWait should always be the *last* interceptor. -->
355             <interceptor-stack name="executeAndWaitStack">
356                 <interceptor-ref name="execAndWait">
357                     <param name="excludeMethods">input,back,cancel</param>
358                 </interceptor-ref>
359                 <interceptor-ref name="defaultStack"/>
360                 <interceptor-ref name="execAndWait">
361                     <param name="excludeMethods">input,back,cancel</param>
362                 </interceptor-ref>
363             </interceptor-stack>
364
365        </interceptors>
366
367         <default-interceptor-ref name="defaultStack"/>
368
369         <default-class-ref class="com.opensymphony.xwork2.ActionSupport" />
370     </package>
371
372 </struts>

<!ELEMENT struts ((package|include|bean|constant)*, unknown-handler-stack?)>
<!ATTLIST struts
    order CDATA #IMPLIED
>

<!ELEMENT package (result-types?, interceptors?, default-interceptor-ref?, default-action-ref?, default-class-ref?, global-results?, global-exception-mappings?, action*)>
<!ATTLIST package
    name CDATA #REQUIRED
    extends CDATA #IMPLIED
    namespace CDATA #IMPLIED
    abstract CDATA #IMPLIED
    strict-method-invocation CDATA #IMPLIED
    externalReferenceResolver NMTOKEN #IMPLIED
>

<!ELEMENT result-types (result-type+)>

<!ELEMENT result-type (param*)>
<!ATTLIST result-type
    name CDATA #REQUIRED
    class CDATA #REQUIRED
    default (true|false) "false"
>

<!ELEMENT interceptors (interceptor|interceptor-stack)+>

<!ELEMENT interceptor (param*)>
<!ATTLIST interceptor
    name CDATA #REQUIRED
    class CDATA #REQUIRED
>

<!ELEMENT interceptor-stack (interceptor-ref*)>
<!ATTLIST interceptor-stack
    name CDATA #REQUIRED
>

<!ELEMENT interceptor-ref (param*)>
<!ATTLIST interceptor-ref
    name CDATA #REQUIRED
>

<!ELEMENT default-interceptor-ref (#PCDATA)>
<!ATTLIST default-interceptor-ref
    name CDATA #REQUIRED
>

<!ELEMENT default-action-ref (#PCDATA)>
<!ATTLIST default-action-ref
    name CDATA #REQUIRED
>

<!ELEMENT default-class-ref (#PCDATA)>
<!ATTLIST default-class-ref
    class CDATA #REQUIRED
>

<!ELEMENT global-results (result+)>

<!ELEMENT global-exception-mappings (exception-mapping+)>

<!ELEMENT action ((param|result|interceptor-ref|exception-mapping)*,allowed-methods?)>
<!ATTLIST action
    name CDATA #REQUIRED
    class CDATA #IMPLIED
    method CDATA #IMPLIED
    converter CDATA #IMPLIED
>

<!ELEMENT param (#PCDATA)>
<!ATTLIST param
    name CDATA #REQUIRED
>

<!ELEMENT result (#PCDATA|param)*>
<!ATTLIST result
    name CDATA #IMPLIED
    type CDATA #IMPLIED
>

<!ELEMENT exception-mapping (#PCDATA|param)*>
<!ATTLIST exception-mapping
    name CDATA #IMPLIED
    exception CDATA #REQUIRED
    result CDATA #REQUIRED
>

<!ELEMENT allowed-methods (#PCDATA)>

<!ELEMENT include (#PCDATA)>
<!ATTLIST include
    file CDATA #REQUIRED
>

<!ELEMENT bean (#PCDATA)>
<!ATTLIST bean
    type CDATA #IMPLIED
    name CDATA #IMPLIED
    class CDATA #REQUIRED
    scope CDATA #IMPLIED
    static CDATA #IMPLIED
    optional CDATA #IMPLIED
>

<!ELEMENT constant (#PCDATA)>
<!ATTLIST constant
    name CDATA #REQUIRED
    value CDATA #REQUIRED
>

<!ELEMENT unknown-handler-stack (unknown-handler-ref*)>
<!ELEMENT unknown-handler-ref (#PCDATA)>
<!ATTLIST unknown-handler-ref
    name CDATA #REQUIRED
>
时间: 2025-01-31 06:37:16

struts2-core-2.3.20.jar的相关文章

Struts2.5需要的最少jar文件

以Struts2.5.2为例 从官网上下载“struts-2.5.2-min-lib.zip”,里面有7个jar文件: commons-fileupload-1.3.2.jarcommons-io-2.4.jarcommons-lang3-3.4.jarcommons-logging-1.1.3.jarfreemarker-2.3.23.jarognl-3.1.10.jarstruts2-core-2.5.2.jar 但只用这7个jar是不够的,要不报错,要不不能正常显示,至少还需要两个: ja

[Java]struts2+spring3+hibernate3所需 jar包

1.struts2提取包从struts2-2.2.1-lib.zip中struts-2.2.1\lib提取如下包aopalliance-1.0.jarcommons-collections-3.2.jarcommons-fileupload-1.2.1.jarcommons-io-1.3.2.jarcommons-logging-1.0.4.jarfreemarker-2.3.16.jarognl-3.0.jarstruts2-core-2.2.1.jarstruts2-spring-plugi

Struts2系列:(20)ValidationAware

本文主要介绍ValidationAware.ValidationAwareSupport和ActionSupport(因为ActionSupport类也实现了ValidationAware接口). 1.ValidationAware ValidationAware接口,能够记录Action级别和Field级别的错误. package com.opensymphony.xwork2; import java.util.Collection; import java.util.List; impor

eclipse集成struts2.3.20

需要强调的是,这里介绍的是在eclipse工具下集成struts2.3.20而不是MyEclipse添加对struts2的支持~MyEclipse可以很方便的在工程中添加对struts2的支持,网上随便搜一下资料很多,例如http://jingyan.baidu.com/article/93f9803fe1acefe0e46f55fd.html这个页面里讲的就不错~ 这里需要注意的是,eclipse可以精确的支持struts2的详细版本,例如这里的struts2.3.20,而MyEclipse虽

Struts2.3.6+Spring3.2.4+Hibernate4.2.4 Jar包总结

struts2-core-2.3.16.jar 是struts2的核心框架 xwork-core-2.3.16.jar struts2-core的依赖包,struts2是在此基础上开发的 javassist-3.15.0-GA.jar 初始化struts2的Filter的必要组件,Hibernate延时加载生成代理类使用,生成字节码的类,同asm,但是较简单,可动态改变类结构或生成类, commons-io-2.4.jar javassist引用的jar包,流操作的一些工具? commons-l

Struts2+Hibernate+Spring(SSH)三大框架整合jar包

Struts2 + Spring3 + Hibernate3 框架整合 1. 每个框架使用 (开发环境搭建 )* 表现层框架 struts2 1) jar包导入: apps/struts2_blank.war 包含struts2 开发最基本的jar包 struts2-convention-plugin-2.3.7.jar用于struts使用注解 (如果不使用注解开发,无需导入) struts2-json-plugin-2.3.7.jar 用于struts2整合Ajax struts2-sprin

java项目中可能会使用到的jar包解释

一.Struts2 用的版本是struts2.3.1.1 一个简单的Struts项目所需的jar包有如下8个 1. struts2-core-2.3.1.1.jar: Struts2的核心类库. 2. xwork-core-2.3.1.1.jar: XWork核心类,XWork是一个标准的command模式实现,并且完全从web层剥离出来.WebWork被构建在Xwork上,而Struts2由Struts1和WebWork两个经典的MVC框架发展而来. 3. ognl-3.0.3.jar: 支持

Unable to load configuration. - bean - jar:file:../../ComputerScience/JavaEE/workspace/.metadata解决办法

在运行一个JavaEE的项目时,出现了如下的错误: unable to load configuration. - bean - jar:file:/../workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WorkSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:64:179 at org.apache.struts2.d

struts2.1笔记06:struts2开发环境的搭建实际操作出现的问题

1.我根据新建一个struts工程之后,启动报错,如下: 1 六月 29, 2015 3:08:18 下午 org.apache.catalina.core.AprLifecycleListener init 2 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\sof