Constant constant configuration in struts2

Source: Internet
Author: User
Tags cos i18n xslt

Detailed constant configuration in the Struts2

This article mainly explains the constant constant configuration in struts2, the content mainly comes from the arrangement of the Internet.
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE struts Public "-//apache software foundation//dtd struts Configuration 2.0//en"
"HTTP://STRUTS.APACHE.ORG/DTDS/STRUTS-2.0.DTD" >
<struts>
<!--Specify the default encoding set for the Web App. This property is useful for handling Chinese request parameters and should be set to GBK or GB2312 for getting the Chinese request parameter value.
Tip: When setting this parameter to GBK, the equivalent of calling HttpServletRequest's Setcharacterencoding method >
<constant name= "struts.i18n.encoding" value= "UTF-8"/>

<!--Specifies the default objectfactory Bean for Struts2, which is the default value of Spring.>
<constant name= "struts.objectfactory" value= "Spring"/>

<!--Specifies the auto-assembly mode for the spring framework, which defaults to name, which is automatically assembled by default based on the bean's Name property. >
<constant name= "Struts.objectFactory.spring.autoWire" value= "name"/>

<!--This property specifies whether the bean instance is cached when the spring framework is consolidated, which only allows true and false two property values, and its default value is true. This property value is generally not recommended .>
<constant name= "Struts.objectFactory.spring.useClassCache" value= "true"/>

<!--This property specifies the framework that handles the MIME type (file upload) request of Multipart/form-data, which supports attribute 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 property is Jakarta.
Note: If you need to use the COS or Pell file Upload method, you should copy the corresponding jar file to your Web app. For example, using the Cos upload method, you need to download the COS framework's jar file yourself ,
and place the file under the Web-inf/lib path. >
<constant name= "Struts.multipart.parser" value= "Jakarta"/>

<!--This property specifies the temporary save path for the uploaded file, and the default value for this property is Javax.servlet.context.tempdir. >
<constant name= "Struts.multipart.saveDir" value= ""/>

<!--This property specifies the maximum number of bytes allowed for the entire request content on a Struts 2 file. >
<constant name= "struts.multipart.maxSize" value= "1000000000000"/>

<!--This property specifies the request suffix that needs to be processed by Struts 2, the default value of which is action, that is, all requests that match *.action are handled by struts 2.
if the user needs to specify more than one request suffix, the multiple suffixes are separated by commas (,). >
<constant name= "struts.action.extension" value= "Do"/>

<!--This property sets whether to provide a static content service through a jar file, which supports only true and false property values, and the default property value of this property is true. >
<constant name= "struts.serve.static" value= "true"/>

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

<!--This property sets whether the Struts 2 app uses development mode. If you set this property to True, you can display more, more friendly error hints when an error is applied.
This property accepts only true and flase two values, and the default value of 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. >
<constant name= "Struts.devmode" value= "false"/>

<!--This property sets whether the system reloads the resource file (allowing internationalized file overloading) every time an HTTP request arrives. The default value for 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 to reload the internationalized resource file on each request, allowing developers to see real-time development effects;
the product release phase should set this property to False, in order to provide response performance, and each request requires a reload of the resource file to significantly reduce the performance of the application. >
<constant name= "Struts.i18n.reload" value= "false"/>

<!--This property specifies the view label's default view theme, which is the default value of XHTML. >
<constant name= "Struts.ui.theme" value= "simple"/>

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

<!--This property sets whether the system reloads the file automatically when the Struts.xml file changes. The default value for this property is false. >
<constant name= "Struts.configuration.xml.reload" value= "false"/>

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

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

<!--Specifies whether to cache freemarker templates. Default Value false.>
<constant name= "Struts.freemarker.templatesCache" value= "true"/>

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

<!--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 when the app is in the product usage phase,
This property is usually set to False. >
<constant name= "Struts.xslt.nocache" value= "false"/>

<!--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, separate the file names of multiple profiles with commas (,).
The default value for this property is Struts-default.xml,truts-plugin.xml,struts.xml and you see the property value, so you should understand why the Struts 2 framework loads the Struts.xml file by default. >
<constant name= "struts.configuration.files" value= "Struts-default.xml,struts-plugin.xml"/>

<!--Sets whether the mapper always selects the full namespace. The default value for this property is False.>
<constant name= "Struts.mapper.alwaysSelectFullNamespace" value= "false"/>

<!--Set the root path of the Convention plug-in Location view resource. Default value is/web-inf/content>
<constant name= "Struts.convention.result.path" value= "/web-inf/content/"/>

<!--Convention Plug-ins specify packages as root packages with this constant >
<constant name= "struts.convention.action.package" value= "Default"/>

<!--whether to search for action> from the package
<constant name= "struts.convention.action.disableScanning" value= "false"/>

<!--official only shows that it needs to be set up under JBoss condition
<constant name= "Struts.convention.exclude.parentClassLoader" value= "true"/>
<constant name= "Struts.convention.action.fileProtocols" value= "Jar,zip"/>

<!--the action in which jar packages are included. Comma-delimited string .>
<constant name= "Struts.convention.action.includeJars" value= ". *?/_wl_cls_gen.*?jar (!/)?"/>

<!--determine the path to the search package. As long as the package with the end action is searched .>
<constant name= "struts.convention.package.locators" value= "action"/>

</struts>

Constant constant configuration in struts2

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.