STRUTS2-Summary of common constant

Source: Internet
Author: User
Tags i18n

See note

<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE struts Public "-//apache software foundation//dtd struts Configuration 2.3//en" "Http://struts.apache.or G/dtds/struts-2.3.dtd "><Struts>    <!--set it to development mode, set to False when publishing -    <constantname= "Struts.devmode"value= "true" />    <!--set whether to hot load when class is modified and set to False when publishing -    <constantname= "Struts.convention.classes.reload"value= "true"/>    <!--Automatic dynamic method invocation, which can be called after using this setting: Action!method -    <constantname= "Struts.enable.DynamicMethodInvocation"value= "true" />    <!--Specifies the directory address where the JSP file resides -    <constantname= "Struts.convention.result.path"value= "/web-inf/content/" />    <!--Use Struts-default default converter, if rest is used: rest-default,rest requires rest of the jar plugin -    <constantname= "Struts.convention.default.parent.package"value= "Struts-default"/>    <!--used to configure the package name suffix. The default is action, actions, struts -    <constantname= "Struts.convention.package.locators"value= "Actions" />    <!--used to configure the class name suffix, the default is action, STRUTS2 will only go to the class with this suffix name to map -    <constantname= "Struts.convention.action.suffix"value= "Action"/>    <!--set to create an action map even if there are no @action annotations. The default value is False. Because Convention-plugin is a better-than-configured style, you can access the methods in the corresponding action without annotations based on predefined definitions -    <constantname= "Struts.convention.action.mapAllMatches"value= "true"/>    <!--Custom JSP file-named delimiters -    <constantname= "Struts.convention.action.name.separator"value="-" />    <!--internationalized Resource File name -    <constantname= "Struts.custom.i18n.resources"value= "i18n" />    <!--whether to load internationalized resource files automatically -    <constantname= "Struts.i18n.reload"value= "true" />    <!--whether the browser caches static content -    <constantname= "Struts.serve.static.browserCache"value= "false" />     <!--upload file size limit settings -    <constantname= "Struts.multipart.maxSize"value= "-1" />    <!--theme, set the value to simple, that is, the UI template is not used. This will not generate additional HTML tags -    <constantname= "Struts.ui.theme"value= "simple" />    <!--encoding Format -    <constantname= "Struts.i18n.encoding"value= "UTF-8" /></Struts>

Basic constants
  • struts.devmode Optional value True,false (default false), in development mode, the ability to dynamically reload the configuration and resource files for struts2 takes effect by default. At the same time, the development mode will provide more perfect log support.
  • struts.i18n.reload Optional value True,false (the default depends on Struts.devmode), whether the local resource file is automatically reloaded.
  • The struts.i18n.encoding is primarily used to set the request encoding (default value (UTF-8)), the resolution encoding of the head and include tags. The parsed encoding of the resource and configuration file.
  • struts.configuration.xml.reload Optional value true,false (default dependent on Struts.devmode) whether the XML configuration file is automatically reloaded
  • struts.action.extension Sets the suffix of the action request for struts, which is separated by commas when supporting multiple.
  • Struts.action.excludePattern set URLs excluded by struts (matched by regular expression) (multiple, comma-separated)
  • struts.tag.altSyntax Optional value True,false (default true) supports OGNL expressions
  • struts.url.http.port Set the HTTP port for the generated URL
  • Struts.url.https.port Set the HTTPS port corresponding to the build URL
  • struts.url.includeParams Optional value None, get, all (default get), sets whether the URL contains parameters, and whether only the Get method is included.
  • struts.locale Set struts2 default locale and decide which resource file to use.
  • Struts.ui.templateDir This property specifies the location of the template file that is required for the view theme, the default value of which is template, which is the templates file under the default load stencil path
  • Struts.ui.theme This property specifies the view label's default view theme, which is the default value of XHTML.
  • Struts.ui.templateSuffix This property specifies the suffix of the template file, the default property value for this property is FTL. This property also allows the use of FTL, VMS, or JSPs to correspond to freemarker, velocity, and JSP templates, respectively
  • struts.multipart.saveDir Setting the default directory for uploading temporary files
  • struts.multipart.maxSize Setting the maximum limit for uploaded temporary files
  • struts.objectFactory.spring.autoWire Optional values (name, type, auto, constructor,name) (default name), set spring's automatic assembly mode, Only the spring plug-in is introduced to be effective.
  • Struts.objectFactory.spring.autoWire.alwaysRespect (default false) sets whether objects are always created with automatic assembly policy.
  • Struts.objectFactory.spring.useClassCache (default false) if the object factory uses the class cache, the development mode is invalid.
  • Struts.xslt.nocache (False by default) sets whether the Xsltresult is not cached.
  • struts.custom.properties Setting the user's custom attribute file name list (separated by)
  • struts.custom.i18n.resources Set user-defined resource file path list (with, separate)
  • struts.serve.static (default false) sets whether static resource requests are supported (requires URLs under struts or static)
  • Struts.serve.static.browserCache (false by default) whether to set the cache in a static resource response. Valid only when static resources are supported.
  • Struts.el.throwExceptionOnFailure (false by default) is thrown when parsing an El expression or cannot find an attribute RuntimeException
  • struts.ognl.logMissingProperties (default false) whether the log does not have a property found
  • Struts.ognl.enableExpressionCache whether to cache ognl parsed expressions.
  • struts.enable.DynamicMethodInvocation (false by default) supports dynamic method calls, specifying methods through!method on URLs.
  • Struts.enable.SlashesInActionNames Whether a slash is supported in the action segment in the URL
  • Struts.mapper.alwaysSelectFullNamespace (false by default) always uses the URL segment before the last slash as the namespace
Core Object Constants
  • struts.actionproxyfactory sets Actionproxy's entity factory, which also generates the default Actioninvoctation
  • struts.xworkconverter Sets the Xworkconverter object, which is used to obtain various types of converters.
  • Struts.unknownhandlermanager Sets the implementation class for Unknownhandlermanager to handle exceptions such as methods that cannot be found.
  • Struts.multipart.handler Sets the Mutipartrequest handler (the default is Jakarta) corresponding class, Org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
  • The struts.mapper.class Optional Value (STRUTS,COMPOSITE,RESTFUL,RESTFUL2) sets the URL resolution and maps to the implementation of the action (default struts).
  • The struts.mapper.prefixMapping is mapped to the corresponding mapper via a URL prefix, in the form of urlprefix1:mappername2,urlprefix2:mappername2. You must add Mapperclass to Org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper, and specify Struts.mapper.class as the mapper.
  • Struts.mapper.composite sets whether to support compound (multiple) actionmapper,mappername separated by commas. Struts.mapper.class must be configured for composite to take effect
  • Struts.mapper.idParameterName for Restful2actionmapper as the ID in the URL parametername
  • struts.ognl.allowStaticMethodAccess (default false) sets whether the OGNL expression supports static methods.
  • struts.configuration Sets the settings class for struts2. (no longer used after 2.1.2)
  • struts.urlrenderer Set the URL of the STRUTS2 to render (the URL used for the build), (default struts), Class name Org.apache.struts2.components.ServletUrlRenderer
  • struts.objectfactory Set Struts2 object factory, Default (struts), The class name Org.apache.struts2.impl.StrutsObjectFactory, when the struts2-spring plugin is introduced, is modified to Org.apache.struts2.spring.StrutsSpringObjectFact Ory
  • Struts.xworktextprovider Sets the STRUTS2 resource file content to provide the implementation of the class. Default is Com.opensymphony.xwork2.TextProviderSupport
  • Struts.actionvalidatormanager Sets the implementation class of the Actionvalidatormanager.
  • Struts.valuestackfactory Sets the implementation of the Struts2 Valuestack factory.
  • Struts.reflectionprovider Setting the implementation class for Reflectionprovider
  • Struts.reflectioncontextfactory Setting the implementation class for Reflectioncontextfactory
  • Struts.patternmatcher Setting the implementation class for Patternmatcher
  • Struts.staticcontentloader Setting the implementation class for Staticcontentloader

STRUTS2-Summary of common constant

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.