Struts2 Common Constants constant

Source: Internet
Author: User

Common constant configuration
Struts.serve.static.browserCacheThis property 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 property to False.

struts.enable.DynamicMethodInvocationThis property sets whether struts 2 supports dynamic method calls, and the default value for this property is true. If you need to turn off dynamic method calls, you can set this property to False.

Struts.enable.SlashesInActionNamesThis property sets whether struts 2 is allowed to use a slash in the action name, and the default value for this property is false. This property can be set to true if the developer wants to allow a slash in the action name.

Struts.tag.altSyntaxThis property specifies whether expression syntax is allowed in the Struts 2 label, because the expression syntax is usually required in the label, so the property should be set to true, and the default value of this property is true.

Struts.devmodeThis property sets whether the Struts 2 app uses development mode. If you set this property to True, you can display more and more friendly error hints when an error is applied. This property accepts only true and flase two values, and the default value for this property is false. Typically, the app is set to true during development, and is set to False when the product release phase is entered.

Struts.i18n.reloadThis property sets whether the system reloads the resource file every time the HTTP request arrives. The default value of this property is false. Setting this property to true during development is more beneficial for development, but should be set to false during the product release phase.

Tip The development phase sets this property to true and will reload the internationalized resource file on each request, allowing developers to see real-time development effects, which should be set to false in the product release phase to provide response performance. Reloading the resource file for each request can greatly reduce the performance of the application.

Struts.ui.themeThis property specifies the view label's default view theme, which defaults to XHTML.

Struts.ui.templateDirThis property specifies the location of the template file that is required for the view theme, and the default value for this property is template, which is the templates file under the default load stencil path.

Struts.ui.templateSuffixThis property specifies the suffix of the template file, which is the default property value of FTL. This property also allows the use of FTL, VMS, or JSPs to correspond to freemarker, velocity, and JSP templates, respectively.

Struts.configuration.xml.reloadThis property sets whether the system reloads the file automatically when the Struts.xml file changes. The default value for this property is false.

Struts.velocity.configfileThis property specifies the location of the Velocity.properties file required by the velocity framework. The default value for this property is velocity.properties.

struts.velocity.contextsThis property specifies the context position of the velocity frame, and if the frame has more than one context, the multiple context is separated by a comma (,).

struts.velocity.toolboxlocationThis property specifies the location of the toolbox for the velocity frame.

Struts.url.http.portThis property specifies the listening port on which the Web app resides. This property is typically not too large for users, but it only provides the default port for Web apps when struts 2 needs to generate a URL, such as a URL tag.

Struts.url.https.portThis property is similar to the role of the Struts.url.http.port property, except that the property specifies the cryptographic service port for the Web App.

Struts.url.includeParamsThis property specifies whether the request parameters are included when Struts 2 generates the URL. This property accepts none, get, and all three property values, respectively, corresponding to a request parameter that does not contain, contains only a get type, and contains all the request parameters.


struts.custom.i18n.resourcesThis attribute specifies the Internationalized resource files required by the Struts 2 application, and if there are multiple internationalized resource files, the file names of multiple resource files are separated by commas (,).


Struts.dispatcher.parametersWorkaroundFor some Java EE servers, the HttpServlet request call Getparametermap () method is not supported, and you can set the property value to True to resolve the problem. The default value for this property is false. For WebLogic, Orion, and OC4J servers, this property should normally be set to true.

Struts.freemarker.manager.classnameThis property specifies the Freemarker manager used by struts 2. The default value for this property is Org.apache.struts2.views.freemarker.FreemarkerManager, which is the built-in Freemarker manager for Struts 2.

Struts.freemarker.wrapper.altMapThis property supports only true and false two property values, and the default value is true. You typically do not need to modify this property value.

Struts.xslt.nocacheThis property specifies whether the XSLT result uses the stylesheet cache. This property is usually set to True when the app is in development, and is usually set to False when the app is in the product usage phase.

Struts.configuration.filesThis property specifies the configuration file that the Struts 2 framework loads by default, and if you need to specify that multiple configuration files are loaded by default, separate the file names of multiple profiles with commas (,). The default value for this property is Struts-default.xml,struts-plugin.xml,struts.xml, and when you see the property value, the reader should understand why the Struts 2 framework loads the Struts.xml file by default.

Common constant configuration
Struts.serve.static.browserCacheThis property 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 property to False.

struts.enable.DynamicMethodInvocationThis property sets whether struts 2 supports dynamic method calls, and the default value for this property is true. If you need to turn off dynamic method calls, you can set this property to False.

Struts.enable.SlashesInActionNamesThis property sets whether struts 2 is allowed to use a slash in the action name, and the default value for this property is false. This property can be set to true if the developer wants to allow a slash in the action name.

Struts.tag.altSyntaxThis property specifies whether expression syntax is allowed in the Struts 2 label, because the expression syntax is usually required in the label, so the property should be set to true, and the default value of this property is true.

Struts.devmodeThis property sets whether the Struts 2 app uses development mode. If you set this property to True, you can display more and more friendly error hints when an error is applied. This property accepts only true and flase two values, and the default value for this property is false. Typically, the app is set to true during development, and is set to False when the product release phase is entered.

Struts.i18n.reloadThis property sets whether the system reloads the resource file every time the HTTP request arrives. The default value of this property is false. Setting this property to true during development is more beneficial for development, but should be set to false during the product release phase.

Tip The development phase sets this property to true and will reload the internationalized resource file on each request, allowing developers to see real-time development effects, which should be set to false in the product release phase to provide response performance. Reloading the resource file for each request can greatly reduce the performance of the application.

Struts.ui.themeThis property specifies the view label's default view theme, which defaults to XHTML.

Struts.ui.templateDirThis property specifies the location of the template file that is required for the view theme, and the default value for this property is template, which is the templates file under the default load stencil path.

Struts.ui.templateSuffixThis property specifies the suffix of the template file, which is the default property value of FTL. This property also allows the use of FTL, VMS, or JSPs to correspond to freemarker, velocity, and JSP templates, respectively.

Struts.configuration.xml.reloadThis property sets whether the system reloads the file automatically when the Struts.xml file changes. The default value for this property is false.

Struts.velocity.configfileThis property specifies the location of the Velocity.properties file required by the velocity framework. The default value for this property is velocity.properties.

struts.velocity.contextsThis property specifies the context position of the velocity frame, and if the frame has more than one context, the multiple context is separated by a comma (,).

struts.velocity.toolboxlocationThis property specifies the location of the toolbox for the velocity frame.

Struts.url.http.portThis property specifies the listening port on which the Web app resides. This property is typically not too large for users, but it only provides the default port for Web apps when struts 2 needs to generate a URL, such as a URL tag.

Struts.url.https.portThis property is similar to the role of the Struts.url.http.port property, except that the property specifies the cryptographic service port for the Web App.

Struts.url.includeParamsThis property specifies whether the request parameters are included when Struts 2 generates the URL. This property accepts none, get, and all three property values, respectively, corresponding to a request parameter that does not contain, contains only a get type, and contains all the request parameters.


struts.custom.i18n.resourcesThis attribute specifies the Internationalized resource files required by the Struts 2 application, and if there are multiple internationalized resource files, the file names of multiple resource files are separated by commas (,).


Struts.dispatcher.parametersWorkaroundFor some Java EE servers, the HttpServlet request call Getparametermap () method is not supported, and you can set the property value to True to resolve the problem. The default value for this property is false. For WebLogic, Orion, and OC4J servers, this property should normally be set to true.

Struts.freemarker.manager.classnameThis property specifies the Freemarker manager used by struts 2. The default value for this property is Org.apache.struts2.views.freemarker.FreemarkerManager, which is the built-in Freemarker manager for Struts 2.

Struts.freemarker.wrapper.altMapThis property supports only true and false two property values, and the default value is true. You typically do not need to modify this property value.

Struts.xslt.nocacheThis property specifies whether the XSLT result uses the stylesheet cache. This property is usually set to True when the app is in development, and is usually set to False when the app is in the product usage phase.

Struts.configuration.filesThis property specifies the configuration file that the Struts 2 framework loads by default, and if you need to specify that multiple configuration files are loaded by default, separate the file names of multiple profiles with commas (,). The default value for this property is Struts-default.xml,struts-plugin.xml,struts.xml, and when you see the property value, the reader should understand why the Struts 2 framework loads the Struts.xml file by default.

Struts2 Common Constants constant

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.