Schema and coupling-STRUST2 using Profile management constants

Source: Internet
Author: User
Tags constant i18n

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

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.