Common constant configurations of struts2

Source: Internet
Author: User
Tags i18n xslt

Common constant Configuration
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 whether struts 2 supports dynamic method calls. The default value of this attribute is true. To disable dynamic method calling, set this attribute to false.

Struts. Enable. slashesinactionnames
Set struts
2. Whether to use a slash 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. altsyntaxThis attribute specifies whether struts
2. expression syntax is used in tags. Because expression syntax is usually used in tags, the attribute should be set to true, and the default value of this attribute is true.

Struts. devmodeSet struts
2. Whether the 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. ReloadThis 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
When this attribute is set to true in the development phase, the international resource file can be reloaded 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. ThemeThis attribute specifies the default view topic of the view label. The default value of this attribute is XHTML.

Struts. UI. templatedirThis attribute specifies the location of the template file required for 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. templatesuffixThis 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. ReloadThis attribute sets whether the system automatically reloads the Struts. xml file after it changes. The default value of this attribute is false.

Struts. Velocity. configfileThis 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. contextsThis attribute specifies the context position of the velocity framework. If the framework has multiple contexts, multiple contexts are separated by commas.

Struts. Velocity. toolboxlocationThis attribute specifies the location of the toolbox of the velocity framework.

Struts. url. http. PortThis attribute specifies the listening port of the Web application. This attribute is usually not too large for users, just when struts
2. When a URL (such as a URL tag) needs to be generated, the default port of the Web application is provided.

Struts. url. HTTPS. PortThis 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. includeparamsThis attribute specifies struts
2. Whether the URL contains the request parameters. 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. ResourcesThis attribute specifies struts
2. If multiple international resource files are available, the names of these resource files are separated by commas.

Struts. Dispatcher. parametersworkaroundFor some java
EE server, does not support httpservlet
Request calls the getparametermap () method. 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 struts
2. freemarker manager. The default value of this attribute is org. Apache. struts2.views. freemarker. freemarkermanager. This is struts.
2. built-in freemarker manager.

Struts. freemarker. wrapper. altmapThis 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. nocacheThis attribute specifies the XSLT
Whether to use the style sheet cache for result. 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. FilesThis attribute specifies struts
2. Default Configuration Files loaded by the Framework. If you need to specify multiple configuration files to be 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 struts
2. The framework loads the Struts. xml file by default.

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.