Constant detailed in Struts 2

Source: Internet
Author: User
Tags i18n xslt

By configuring these properties, you can change some of the default behavior of the Struts 2 framework, which can be done in the Struts.xml file or in the Struts.properties file.

1.<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.

2.<constant name= "Struts.i18n.reload" value= "false"/>
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.

3.<constant name= "struts.custom.i18n.resources" value= "Application"/>
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 (,).

4.<constant name= "struts.action.extension" value= "action"/>
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 (,).

5.<constant name= "Struts.serve.static.browserCache" value= "true"/>
Sets whether the browser caches static content, the default value is True (used in a production environment), and the development phase is best off.

6.<constant name= "Struts.configuration.xml.reload" value= "false"/>
When the configuration file for Struts 2 is modified, the system automatically reloads the file, the default value is False (used in production), and the development phase is best opened.

7.<constant name= "struts.configuration.files" value= "Struts-default.xml,struts-plugin.xml,struts.xml"/>
This 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 the reader should understand why the Struts 2 framework loads the Struts.xml file by default when it sees the property value.

8.<constant name= "struts.configuration" value= "org.apache.struts2.config.DefaultConfiguration"/>
Specifies that the STRUTS2 Profile Manager is loaded, The default is Org.apache.struts2.config.DefaultConfiguration, the developer can customize the Profile Manager, the class to implement the configuration interface, you can automatically load the struts2 configuration file.

8.<constant name= "struts.continuations.package" value= ""/>
A complete, continuous package name that contains the actions.

10.<constant name= "Struts.devmode" value= "true"/>
Development mode so that more detailed error messages can be printed.

11.<constant name= "Struts.serve.static.browserCache" value= "false"/>
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.

12.<constant name= "Struts.enable.DynamicMethodInvocation" value= "false"/>
This 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.

13.<constant name= "Struts.enable.SlashesInActionNames" value= "false"/>
This 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.

14.<constant name= "Struts.tag.altSyntax" value= "true"/>
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.

15.<constant name= "Struts.devmode" value= "false"/>
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.

16.<constant name= "Struts.ui.theme" value= "xhtml"/>
This property specifies the view label's default view theme, which defaults to XHTML and can be simple,xhtml or Ajax.

17.<constant name= "Struts.ui.templateDir" value= "template"/>
This 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.

18.<constant name= "Struts.ui.templateSuffix" value= "FTL"/>
This 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.

19.<constant name= "Struts.velocity.configfile" value= "velocity.properties"/>
This property specifies the location of the Velocity.properties file required by the velocity framework. The default value for this property is velocity.properties.

20.<constant name= "struts.velocity.contexts" value= ""/>
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 (,).

21st.<constant name= "struts.velocity.toolboxlocation" value= ""/>
This property specifies the location of the toolbox for the velocity frame.

22.<constant name= "struts.url.http.port" value= "/> "
This property specifies the listening port on which the Web app resides. This property is generally not of much use, but it only provides the default port for Web apps when struts 2 needs to generate a URL, such as a URL tag.

23.<constant name= "Struts.url.https.port" value= "443"/>
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.

24.<constant name= "Struts.url.includeParams" value= "None|get|all"/>
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.

25.<constant name= "Struts.dispatcher.parametersWorkaround" value= "false"/>
For 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.

26.<constant name= "struts.freemarker.manager.classname" value= ""/>
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.

27.<constant name= "Struts.freemarker.wrapper.altMap" value= "true"/>
This 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.

28.<cosntant name= "Struts.freemarker.templatesCache" value= "false"/>
Sets whether to set the cache for Freemarker templates, which is equivalent to copying the template to web_app/templates.

29.<constant name= "Struts.xslt.nocache" value= "false"/>
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.

30.<constant name= "struts.custom.properties" value= "Application,org/apache/struts2/extension/custom
"/>

Specifies that the Struts2 app loads a user-defined property file that specifies a property that does not overwrite the property specified in the Struts.properties file. If multiple custom properties files need to be loaded, the file names of multiple custom properties files are separated by commas (,). (i.e. do not overwrite struts.properties!)

31.<constant name= "Struts.locale" value= "Zh_cn"/>
The default international region information.

32.<constant name= "Struts.mapper.class" value= "Org.apache.struts2.dispatcher.mapper.DefaultActionMapper"/ >
Specifies the request URL with the action Mapper, which defaults to Org.apache.struts2.dispatcher.mapper.DefaultActionMapper

33.<cosntant name= "Struts.mapper.alwaysSelectFullNamespace" value= "false"/>
Sets whether the namespace is always selected anywhere before the last slash

34.<constant name= "struts.multipart.maxSize" value= "2097152"/>
Multipart maximum size of request information (file upload, which specifies the maximum number of bytes allowed for the entire request content on a Struts 2 file).

35.<constant name= "struts.multipart.parser" value= "cos"/>
This property specifies processing Mime-type multipart/form-data, file uploads (COS, Pell, Jakarta)
The Org.apache.struts2.dispatcher.multipart.MultiPartRequest parser interface (for file uploads) used specifically for multipart request information.

36.<constant name= "Struts.multipart.saveDir" value= "/tmpuploadfiles"/>
Specifies the temporary directory when the file is uploaded, using Javax.servlet.context.tempdir by default.

37.<constant name= "struts.objectfactory" value= "Spring"/>
This property specifies that the action in Struts 2 is created by the spring container.

38.<constant name= "Struts.objectFactory.spring.autoWire" value= "name"/>
Specifies the assembly mode of the spring frame, assembled in: Name, type, auto, and constructor (name is the default assembly mode)

39.<constant name= "Struts.objectFactory.spring.useClassCache" value= "true"/>
This property specifies whether the bean is cached when the spring is consolidated, the value is true or FALSE, and the default is true.

40.<cosntant name= "Struts.objecttypedeterminer" value= "Tiger"/>
Specify type checking, including Tiger and Notiger

Constant detailed in Struts 2

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.