Schema and coupling-STRUST2 using Profile management constants
The STRUTS2 constant is also called the Struts2 attribute, which controls the application characteristics of the entire Struts2. 1, STRUTS2 constant configuration There are three ways:
(1) in Web. xml: 4 rows per constant configuration
<!--You can configure the Struts2 constants by using the filter configuration initialization Parameters--
<init-param>
<param-name>name</param-name>
<param-value>value</param-value>
</init-param>
(2) In Struts.xml file configuration, one constant per line
<constant name= "name" value= "value"/>
(3) Add an additional struts.properties file and configure a constant per line
Name=value
2. Several common constants supported by STRUTS2
(1) struts.i18n.encoding-equivalent to Request.setcharacterencoding ("Utf-8")
(2) Struts.multipart.saveDir-Set up a temporary directory for file uploads
(3) Struts.multipart.maxsize-Set the total size of the file to be uploaded per request cannot exceed that size
(4) Struts.action.extension-Sets the default suffix for the action. The default value of this constant is the action
(5) Struts.serve.static.browserCache-Controls whether the browser caches static content.
(6) Struts.devmode-setting is in development mode
Equivalent to the following two configurations
Struts.i18n.relode-Sets whether the resource file is reloaded every time the request is requested. Development stage set to True
Struts.configration.xml.relode-Set the app to reload automatically after each struts.xml modification
(7) Struts.custom.i18n.resource-load internationalized resource file