crude solution

2010-04-24  来源:本站原创  分类:Java  人气:410 

Reprinted: 3DStruts2

struts.configuration (default: org.apache.struts2.config.DefaultConfiguration)
Struts 2 configuration file specified load the configuration file manager, value realization org.apache.struts2.config.Configuration interface class, the implementation class needs to automatically load the Struts configuration file.

struts.locale (default: the current virtual machine's local value)
Specify the current default locale for application information, such as en_US. Application of this property and struts.custom.i18n.resources achieve internationalization, Struts reads the specified value based on the two properties corresponding resource files, such as This property is specified in the struts.xml through constant invalid, can only be specified in the properties file to work.

struts.i18n.encoding (default: UTF-8)
Information specified within the international coding method for dealing with the Chinese request this property is very useful parameters, parameters for access to the Chinese request, the property value should be set to GBK or GB2312.

struts.objectFactory (default: com.opensymphony.xwork2.ObjectFactory)
Specify the object factory class, specify the class need to inherit the default class, class, support for abbreviated, such as the spring, set to be copied when Spring struts2-spring-plugin-xxx.jar and the corresponding spring.jar to the / WEB-INF/lib directory next.

struts.objectFactory.spring.autoWire (default: name)
Designated Spring Bean factory assembly model, values were name, type, auto, and constructor.
name: in accordance with the action of the attribute name and the name of Spring bean in the match, if the match on the automatic assembly; type: according to the type of action the property, registered in the Spring bean to look, if the same is automatically assembled. This requires that only registered in the Spring of this type of a bean; auto: Spring will attempt to automatically monitor to find the best way to automatically assemble your action; constructor; Spring bean will automatically assemble the parameters of the constructor

struts.objectFactory.spring.useClassCache (default: true)
This property specifies the Spring framework integration, whether the cache Bean instance, the attribute only allows the use of true and false values of the two properties. Generally not recommended to modify the property value.

struts.objectTypeDeterminer (default: tiger)
This property specifies the type of detection mechanism Struts 2, set to judge Collection and Map of the key or value type of class, and its value com.opensymphony.xwork2.util.ObjectTypeDeterminer the implementation class. Usually support the tiger or notiger two kinds of property values. One tiger = com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer, notiger = com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer, the former is inherited class.
ObjectTypeDeterminer check the file contains the Map and Collection for that object type contained in the relevant content. The Collection, such as the List, use the format Element_xxx to specify which element types, where xxx is the action or other objects collection of attribute names. For Map, need to follow the format Key_xxx and Element_xxx key and value respectively, the type specified.
Starting from the WebWork 2.1.x is still supported Collection_xxx writing this format, even though the format has been declared abandoned and will eventually be removed.

struts.multipart.parser (default: jakarta)
Value of the realization of the corresponding org.apache.struts2.dispatcher.multipart.MultiPartRequest class, set to deal with MIME-type to use multipart / form-data HTTP POST request method the analytical framework, the property support cos, pell and other attributes jakarta value, that correspond to the use of cos the file upload framework, pell and common-fileupload upload file upload framework. If you need to upload using a framework, the corresponding JAR package will be introduced to the applications, such as jakarta, need to commons-fileupload-*.*. jar to WEB-INF/lib in the copy.

struts.multipart.saveDir (default: javax.servlet.context.tempdir)
This property specifies the temporary save file upload path.

struts.multipart.maxSize (default: 2097152)
Setting file upload request in the entire contents of the maximum allowed number of bytes to byte as a unit, can be set to -1 that is not restricted. Use this attribute when the file size limit upload not combine international resources to the user prompt, use the fileUpload interceptor struts.xml maximumSize parameters in the file upload limit, and set global resources in the file struts. messages.error.file.too.large, you can upload files too large to return error messages to the user prompt. (default: not enabled)
Specified load user-defined property file, the custom properties file specified property does not cover file specified attribute. If you need to load multiple custom properties file, a number of custom properties file name in English comma (,) separated. Values such as: application, org/apache/struts2/extension/custom.

struts.mapper.class (default: org.apache.struts2.dispatcher.mapper.DefaultActionMapper)
HTTP request will be mapped to the specified Action mapping device. The default mapper prefix and Action on request of the name attribute to complete mapping.

struts.action.extension (default: action)
Used in conjunction with DefaultActionMapper, the suffix attribute specifies Http request that all match the *. action requests by the Struts 2 treatment. If the user needs to specify the number of requests for extension, the number of suffixes in English between the comma (,) separated. If struts.action.extension = action, jnlp, do.

struts.serve.static (default: true)
When FilterDispatcher set the attribute to set whether the JAR file by providing static content, this property is only supported attribute values true and false. If true then Struts Jar files through its own to provide static content, if it is false, you must <context_path> / struts to provide static content.

struts.serve.static.browserCache (default: true)
When FilterDispatcher set the attribute to set browser cache static content only struts.serve.static = true to enter into force. For example, when applied in the development stage, we hope that all access to the server for each request the latest response, you can set this property to false.

struts.enable.DynamicMethodInvocation (default: true)
Whether the property is set to support dynamic method call. Dynamic method call is the element of the action form an Action does not directly equal to the name, such as Struts1 the DispatchAction, that multiple requests within a Action approach. Way to achieve this request, there are two other methods. 2 configuration method for the Action attribute, such as <action name="userLogin" method="login">, is through the method = "login" to every request processing logic configured to Action. 3, using the wildcard mapping (wildcard mappings) methods, such as <action name="user_*" class="action.UserAction" method="{1}">, <action name="user_*"> definition of a series of requested URL is user_ *. action model logic Action. Property value method at the same time an expression (1), that its value is the name attribute value of the first * value. For example: when the user requests URL for the user_login.action will call the login method to UserAction class; user requests when the URL is user_regist.action will call to UserAction class regist method.
Of which the first and third call request handling is foo! Bar.action, can also lead a definition of parameters (such as method: bar), but can not use the action: foo. If <form method="post" action="userOpt!login.action">. The second call request handling method with the same general request.

struts.enable.SlashesInActionNames (default: false)
The property is set to allow the use of slashes in the Action name as the call mode, the property in use as a wildcard mapping methods used to process the request, as defined in the configuration file <action name ="*/*" method = "(2)">, then the last used in the request URL "/ foo / edit" where foo is argument 1, edit the parameter 2. This is the approach WebWork.

struts.tag.altSyntax (default: true)
This property specifies whether to allow the label to use expression syntax, that is, whether the label using the $ () syntax.

struts.devMode (default: false)
Set whether the development model struts. Set to true, you can combine struts.i18n.reload and struts.configuration.xml.reload to facilitate the development of true, and can be displayed when an error in the application of more and more error-friendly tips.
struts.i18n.reload (default: false)
The property settings for each HTTP request arrives, the system resource files are reloaded. Development stage set true, for the benefit of real-time debugging. But the products need to set to stage false, in order to improve response performance.
struts.configuration.xml.reload (default: false)
The property is set when the struts.xml file changes, the system is automatically re-load the file. Set the environment Ibid.

struts.configuration.files (default: struts-default.xml, struts-plugin.xml, struts.xml
Struts 2 framework specified load default configuration file, if you need to specify a default load multiple profiles, multiple configuration files in English comma between the file name.

struts.ui.theme (default: xhtml)
View the default view specified label theme. Theme can be understood as the template, struts ui have a corresponding label template, you can extract the struts2-all-2.0.1.jar to see, there are template directory, open struts ui xhtml see the corresponding label template. The main role of theme are as follows: 1) unified control to consider the appearance and behavior. For example, text boxes, there are required and non-required, then we can customize the text box templates required in the text box onto the back of a red "*", and with a required check. 2) the unified layout style, we are only concerned with the content without having to concern about the layout. Such as form, an application has multiple query interfaces, query interface are all using the same form template, maintaining a unified style. Struts2 provides five default theme: Simple, simple themes; XHTML, default theme, using the common HTML techniques; CSS XHTML, using CSS to achieve the XHTML theme; AJAX, XHTML-based theme, but the synchronization of the AJAX functionality. Also can customize the theme: 1) established under the WEB-INF folder themes / mytheme, 2) configuration, specify the use of the theme (struts.ui.theme = mytheme, struts.ui.templateDir = / WEB-INF / themes), 3) editing. ftl file.
struts.ui.templateDir (default: template)
Store directory specified template.
struts.ui.templateSuffix (default: ftl)
Specify the template file suffix, value, including ftl, vm or jsp, corresponding to FreeMarker, Velocity and JSP templates. Because the Struts2 default FreeMarker template to write, so the default property value is ftl.

struts.velocity.configfile (default:
Velocity framework specifies the required file.
struts.velocity.contexts (default: empty)
Velocity Context framework specified location, if the frame has more than Context, the number of Context in English between the comma (,) separated.
struts.velocity.toolboxlocation (default: empty)
Velocity toolbox frame specified location.

struts.url.http.port (default: 80)
Specify the listening port where the Web application. Struts 2 only if need to create URL (for example, Url label), only to set the default port of the property.
struts.url.http.port (default: 443)
Struts.url.http.port properties similar to the role of difference is that the property is designated by the encryption service port Web applications.
struts.url.includeParams (default: get)
Whether the specified generated URL contains the request parameters. The property received none, get, and all three attribute values, corresponding to does not contain only type of request that contains GET parameters and contains all the request parameters.

struts.custom.i18n.resources (default: globalMessages)
Specify the Struts application resources needed for international documents, international resources, if more copies of files, the file name of multiple resource files in English comma (,) separated. (Not included. Properties suffix)

struts.dispatcher.parametersWorkaround (default: false)
For some of the Java EE server (such as WebLogic, Orion or OC4J), does not support HttpServlet Request call getParameterMap () method, then you can set the true value of the property to solve the problem.

struts.freemarker.manager.classname (default: org.apache.struts2.views.freemarker.FreemarkerManager)
Struts 2 uses the FreeMarker designated manager. This is a built-in FreeMarker Manager. If you need to use a custom manager, you must inherit FreemarkerManager class.
struts.freemarker.templatesCache (default: false)
Whether the cache FreeMarker templates. Without this feature into the open, copy the template file to WEB_APP / templates can be achieved under the same result.
struts.freemarker.beanwrapperCache (default: false)
Whether the model based on FreeMarker of BeanWrapper open cache
struts.freemarker.wrapper.altMap (default: true)
StrutsBeanWrapper inherited from BeansWrapper, added to the Map object processing, such treatment may cause some problems, so you can set this property to true, so deal with problems using the default BeansWrapper alternative.

struts.xslt.nocache (default: false)
Specifies whether the cache on the XSLTResult use style sheets. When the application is in development stage, the property is usually set to true; when applied in the product use phase, the property is usually set to false.

struts.mapper.alwaysSelectFullNamespace (default: false)
It has been set before the last slash anywhere in the selected namespace.

struts.continuations.package (default: not clear where available)
Set contains the complete continuous actions package name.

struts.codebehind.defaultPackage (default: defer not get to know)

  • crude solution 2010-04-24

    Reprinted: 3DStruts2 struts.configuration (default: org.apache.struts2.config.DefaultConfiguration) Struts 2 configuration file specified load the config

  • Xiang Jie struts2 in 2010-03-29

    Struts 2 framework has two key configuration files: struts.xml and One struts.xml document management applications is mainly responsible for the Action mapping, as well as the definition of Action contained in the Result. In additio

  • Struts2 related to struts-default.xml, struts.xml, file Xiangjie 2009-03-21

    Each study a framework, we will inevitably have to learn some information about the configuration file, struts2 is no exception, here I will talk about several major struts2 configuration file. 1) struts-default.xml This file is the struts2 framework

  • defined in the i18n resource file 2009-08-16

    Q: defined i18n resource file, can be divided into several modules according to the system resource file, not all written in one instance in??? -------------------------------------------------- ----------

  • struts.xml and configuration Xiangjie 2008-10-01

    Struts 2 framework has two key configuration files: struts.xml and One struts.xml document management applications is mainly responsible for the Action mapping, as well as the definition of Action contained in the Result. In additio

  • struts2 of profile Xiangjie 2010-04-16

    struts.action.extension The URL extension to use to determine if the request is meant for a Struts action Extension with the URL to determine if the request is to be used as a Struts action, that is, in fact set the action of the suffix, such as logi

  • Struts2 configuration file using default properties 2010-06-16

    In Struts2 core package (struts2-core- There is a file named (The specific path is Struts2 framework contains a number of "default" configuration property. If we are to chang

  • struts2 in property Xiangjie 2010-06-16

    [Size = medium] Struts 2 framework has two key configuration files: struts.xml and Which is responsible for managing struts.xml file in the Action mapping applications, and contains the Result of the Action definition. In addition,

  • struts-default.xml, struts.xml, file Xiangjie 2010-09-23

    ( Transfer from ) Each study a framework, we will inevitably learn something about the configuration file, struts2 no exception, here I talk about several major struts2 configuration file. 1) struts-default.xml This file is the struts2 framework of t

  • Detailed Struts2 configuration file - struts. Properties 2011-07-19

    This file is the struts2 framework of the global property file is automatically loaded file. This file contains a series of key-value pairs. This file can be configured entirely in struts.xml file, use the constant elements. Here is the file in some

  • 2010-06-12

    Struts2提供了很多可配置的属性,通过这些属性的设置,可以改变框架的行 为,从而满足不同的Web应用的需求.这些属性可以在Struts.properties文件中进行设置,struts.properties是标准的 Java属性文件格式,"#"号作为注释字符,文件由键(Key)-值(value)对组成,struts2的属性为键,属性的值为值. struts.properties文件必须位于classpath下,通常放在Web应用程序的/WEB-INF/classes目录下. str

  • Struts 2.0 <s:select> solution of problems 2010-03-29

    Struts 2.0 <s:select> solution of problems Today, the use of Struts 2.0 <s:select> encountered an error when the label: tag 'select', field 'list', name 'university': The requested list key 'universities' could not be resolved as a collection

  • struts Chinese garbled solution 2009-05-14

    Struts beginner one who is of Chinese garbled encountered problems, the present solution are many. I There are two kinds of classical methods and to share with you. 1, rewrite RequestProcessor This is the simplest method. public class MyRequestProces

  • & & 2010-11-18

    The process of learning struts2 access to the file, the online access and read the original file order is as follows: The document defines the Struts 2 framework, a large number of properties, developers can change these properties to meet the applic

  • Struts 2 2009-05-14

    * 1 Struts 2 o 1.1 Struts 2 environment + Class Library 1.1.1 complete list + Foundation class library 1.1.2 list + 1.1.3 basic configuration o 1.2 configuration file o 1.3 Action o 1.4 I18N/I10N o 1.5 blocker + 1.5.1 elements # in implementa

  • Struts 2 environment 2009-06-06

    Struts 2 environment Download library: A complete list of libraries antlr-2.7.2.jar commons-beanutils-1.6.jar commons-chain-1.1.jar commons-logging-1.0.4.jar commons-logging-api-1.1.jar commons-val

  • struts.multipart and commons-fileupload upload plug-in analysis 2010-03-23

    Using struts2 and commons-fileupload2.1.1 Yesterday encountered an error uploading feature, it is strange, because sometimes success can be uploaded, and some can not upload successfully, the most peculiar is the need to report a mistake, in order to

  • struts 2 configuration Xiangjie 2010-04-25

    struts2 complete list of libraries Reprinted: antlr-2.7.2.jar commons-beanutils-1.6.jar commons-chain-1.1.jar commons-logging-1.0.4.jar commons-logging-api-1.1.jar commons-validator-1.3.0.jar fr

  • struts of the parameter function - switch 2010-05-31

    Transfer from: 1, Struts2 key words: 1, Struts2 is webwork2 developments rather than Struts1, compared to Struts1, Struts2 coding standard with the similar and webwork2 2, Struts2 non-intrusive desig

  • Chinese garbled submitted struts2 solution 2010-09-08

    jsp file using struts2 <s:form> form, set the <% @ page language = "java" pageEncoding = "GBK" contentType = "text / html; charset = GBK"%> Insert data to mysql database, the Chinese always garbled and started thi