Struts2 Common constant configuration

Source: Internet
Author: User
Tags constant cos file upload http request i18n locale resource xslt
Struts.locale:Specifies the default locale for the Web app. The default locale is en_US. struts.i18n.encoding:Specifies the default encoding set for the Web App. This constant is useful for handling Chinese request parameters. The default value for this constant is UTF-8. Struts.objectFactory.spring.autoWire:Specifies the auto-assembly mode of the spring frame, which defaults to name, which is automatically assembled by default from the Bean's name. Struts.multipart.parser:This constant specifies the frame that handles the MIME type (file upload) request of the Multipart/form-data, and the constants support constant values such as COS, Pell, and Jakarta, which correspond to the file upload framework using the COS, respectively. Pell upload and Common-fileupload file upload framework. The default value for this constant is Jakarta. Struts.multipart.saveDir:This constant specifies the temporary save path for the uploaded file, and the default value of the constant is javax.servlet.context.tempdir. struts.multipart.maxSize:This constant specifies the maximum number of bytes allowed for the entire request content on the Struts2 file. struts.action.extension:This constant specifies the request suffix that needs to be Struts2 processed, and the default value of the constant is action, which means that all requests that match *.action have Struts2 processing. If the user needs to specify multiple request suffixes, the multiple suffixes are separated by commas (,). struts.serve.static:This constant sets whether to provide a static content service through a jar file, and only true and false constant values are supported. The default constant value of the constant is true. Struts.serve.static.browserCache:This constant sets whether the browser caches static content. When the app is in development, we want each request to get the latest response from the server, you can set the constant to false. struts.enable.DynamicMethodInvocation:This constant sets whether Struts2 supports dynamic method calls, and the default value of this constant is true, as if the default is false after the struts2.3 version, and should be noted when developing. If you need to turn off dynamic method calls, you can set the constant to false. Struts.tag.altSyntax:This constant specifies whether expression syntax is allowed in the Struts2 label, because the expression syntax is usually required in the label, so the constant should be set to true. The default value for this constant is true. Struts.devmode:This constant sets whether the Struts2 app uses development mode. If you set this constant to true, you can display more and more friendly error hints when an error is applied. The constant accepts only true and false two values, and the default value of the constant is false. This constant is usually set to true during the development phase, and the constant is set to False when the product release phase is entered. Struts.i18n.reload:This constant sets whether the system reloads the resource file every time the HTTP request arrives. The default value for this constant is false. Setting this constant to true during development is more beneficial for development and should be set to false during the product release phase. Struts.ui.theme:This constant specifies the default view theme for the view label, which is the default value XHTML. struts.custom.i18n.resources:This constant specifies the internationalized resource file required by the STRUTS2 application, and if there are multiple files, the file names of multiple resource files are separated by commas. Struts.xslt.nocache:This constant sets whether the XSLT result uses the stylesheet cache. This constant is usually set to True when the application is in development order and should be set to false during the product release phase. struts.ognl.allowStaticMethodAccess:This constant sets whether to allow static methods to be called in a OGNL expression, and the default value of this constant is false. struts.el.throwExceptionOnFailure:This constant sets whether a runtimeexception is thrown when an expression evaluates to failure, or if a constant in the expression does not exist. The default value is False.

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.