Common constants in the STRUTS2 configuration file

Source: Internet
Author: User
Tags i18n xslt

<constant name= "struts.i18n.encoding" value= "UTF-8"/>
Specifies the default encoding set for the Web App, which is equivalent to calling HttpServletRequest's Setcharacterencoding method
<constant name= "struts.action.extension" value= "Do"/>
This property specifies the request suffix that needs to be processed by Struts 2, which is the default value of the action, which means that all requests that match *.action are handled by struts 2. If the user needs to specify multiple request suffixes, the multiple suffixes are separated by commas (,).
<constant name= "Struts.serve.static.browserCache" value= "false"/>
Set whether the browser caches static content, the default value is true, and the development phase is preferable to false
<constant name= "Struts.configuration.xml.reload" value= "true"/>
When the configuration file of struts is modified, the system automatically reloads the file, the default value is False, and the development phase is preferably true
<constant name= "Struts.devmode" value= "true"/>
The development mode is set to true so that more detailed error messages can be printed
<constant name= "Struts.enable.DynamicMethodInvocation" value= "false"/>
Dynamic method calls, which can resolve multiple requests for a servlet, are explained in detail later, by default true, and set to False if off.
Here are some other constants, using the same method as above.
Struts.serve.static.browserCache This 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.DynamicMethodInvocation This property sets whether struts 2 supports dynamic method calls, and the default value of this property is true. If you need to turn off dynamic method calls, you can set this property to False.
Struts.enable.SlashesInActionNames This property sets whether struts 2 is allowed to use a slash in the action name, the default value of 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.altSyntax This 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.devmode This 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.reload This 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.theme This property specifies the view label's default view theme, which is the default value of XHTML.
Struts.ui.templateDir This property specifies the location of the template file that is required for the view theme, which is the default value of the template, which is the templates file under the default load stencil path.
Struts.ui.templateSuffix This property specifies the suffix of the template file, the default property value for this property is FTL. This property also allows the use of FTL, VMS, or JSPs to correspond to freemarker, velocity, and JSP templates, respectively.
Struts.configuration.xml.reload This 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.configfile This 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.contexts This 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.toolboxlocation This property specifies the location of the toolbox for the velocity frame.
Struts.url.http.port This 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.port This 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.includeParams This 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.resources This 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.parametersWorkaround for some Java EE servers, the HttpServlet request call Getparametermap () method is not supported. 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.classname This 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.altMap This property supports only true and false two property values, the default value is true. You typically do not need to modify this property value.
Struts.xslt.nocache This 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.files This property specifies the configuration file that the Struts 2 framework loads by default, and if you need to specify that multiple profiles are loaded by default, the file names of multiple profiles are separated by 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 constants in the STRUTS2 configuration 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.