<Constant name = "struts. i18n. encoding" value = "UTF-8"/>
Specifies the default sequence set of a web application, which is equivalent to calling the setcharacterencoding method of httpservletrequest.
<Constant name = "struts. Action. Extension" value = "do"/>
This attribute specifies the request suffix to be processed by struts 2. The default value of this attribute is action, that is, all requests matching *. Action are processed by struts 2. If you need to specify multiple request suffixes, multiple suffixes are separated by commas.
<Constant name = "struts. Serve. Static. browsercache" value = "false"/>
Sets whether the browser caches static content. The default value is true, and the development stage is preferably false.
<Constant name = "struts. configuration. xml. Reload" value = "true"/>
When the struts configuration file is modified, whether the system automatically reloads the file. The default value is false, and the development stage is preferably true.
<Constant name = "struts. devmode" value = "true"/>
Set "true" in development mode to print more detailed error information.
<Constant name = "struts. Enable. dynamicmethodinvocation" value = "false"/>
Dynamic method call can solve the problem that multiple requests correspond to one servlet. It will be explained in detail later. The default value is true. If it is disabled, it is set to false.
The following are some other constants, which are used in the same way as above.
Struts. Serve. Static. browsercache this attribute sets whether the browser caches static content. When an application is in the development stage, you can set this attribute to false if you want to obtain the latest response from the server for each request.
Struts. Enable. dynamicmethodinvocation this attribute sets struts 2 to support dynamic method calls. The default value of this attribute is true. To disable dynamic method calling, set this attribute to false.
Struts. Enable. slashesinactionnames this attribute sets whether struts 2 allows diagonal lines in the action name. The default value of this attribute is false. If you want to allow a slash in the action name, you can set this attribute to true.
Struts. tag. altsyntax specifies whether expression syntax can be used in struts 2 labels. Because expression syntax is usually used in labels, the attribute should be set to true, and the default value of this attribute is true.
Struts. devmode this attribute sets whether the struts 2 application uses the development mode. If this attribute is set to true, more and more friendly error messages can be displayed when an application error occurs. This attribute only accepts the true and flase values. The default value of this attribute is false. Generally, an application sets this attribute to true during development. when the product is released, this attribute is set to false.
Struts. i18n. reload this attribute sets whether the system reloads the resource file every time an HTTP request arrives. The default value of this attribute is false. Setting this attribute to true during development is more conducive to development, but it should be set to false during product release.
Prompt that the property is set to true in the development phase, and the international resource file can be re-loaded upon each request, so that developers can see the real-time development effect; this attribute should be set to false in the product release phase to provide response performance. re-loading the resource file for each request will greatly reduce the application performance.
Struts. UI. Theme this attribute specifies the default view topic of the view tag. The default value of this attribute is XHTML.
Struts. UI. templatedir specifies the location of the template file required by the view topic. The default value of this attribute is template, that is, the template file under the template path is loaded by default.
Struts. UI. templatesuffix this attribute specifies the suffix of the template file. The default attribute value of this attribute is FTL. This attribute also allows FTL, Vm, or JSP to correspond to freemarker, velocity, and JSP templates respectively.
Struts. configuration. xml. reload this attribute sets whether the system automatically reloads the file when the Struts. xml file changes. The default value of this attribute is false.
Struts. Velocity. configfile this attribute specifies the location of the velocity. properties file required by the velocity framework. The default value of this attribute is velocity. properties.
Struts. Velocity. contexts this attribute specifies the context position of the velocity framework. If the framework has multiple contexts, multiple contexts are separated by commas.
Struts. Velocity. toolboxlocation this attribute specifies the location of the toolbox of the velocity framework.
Struts. url. http. Port this attribute specifies the listening port of the Web application. This attribute is usually not large for users. It only provides the default port for Web Applications When struts 2 needs to generate a URL (such as a URL tag.
Struts. url. HTTPS. Port this attribute is similar to the Struts. url. http. Port attribute. The difference is that this attribute specifies the encrypted service port of the Web application.
Struts. url. includeparams this attribute specifies whether the request parameters are included when struts 2 generates a URL. This property accepts none, get, and all attributes, which correspond to request parameters that do not contain, contain only get parameters, and contain all request parameters.
Struts. custom. i18n. resources this attribute specifies the international resource files required by the struts 2 application. If there are multiple international resource files, the names of these resource files are separated by commas.
Struts. Dispatcher. parametersworkaround does not support httpservlet request calling the getparametermap () method on some java EE servers. You can set this attribute value to true to solve this problem. The default value of this attribute is false. This attribute should be set to true for WebLogic, Orion, and Solaris servers.
Struts. freemarker. Manager. classname this attribute specifies the freemarker manager used by struts 2. The default value of this attribute is org. Apache. struts2.views. freemarker. freemarkermanager, which is the built-in freemarker manager of struts 2.
Struts. freemarker. wrapper. altmap this attribute only supports the true and false attribute values. The default value is true. You do not need to modify the attribute value.
Struts. XSLT. nocache this attribute specifies whether the XSLT result uses the style sheet cache. This attribute is usually set to true when the application is in the development stage. When the application is in the product use stage, this attribute is usually set to false.
Struts. configuration. files this attribute specifies the default configuration file loaded by the struts 2 framework. If you need to specify that multiple configuration files are loaded by default, the names of multiple configuration files are separated by commas. The default value for this property is struts-default.xml, struts-plugin.xml, Struts. XML, and the reader should understand why the struts 2 Framework loads the struts. xml file by default.