正文

struts-config-1.1.DTD祥解2007-04-07 14:46:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/hurongliang/24670.html

分享到:

struts-config-1.1.DTD:
<!--
     DTD for the Struts Application Configuration File, Version 1.1

     To support validation of your configuration file, include the following
     DOCTYPE element at the beginning (after the "xml" declaration):

     <!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

     $Id: struts-config_1_1.dtd 51429 2004-02-17 05:51:48Z martinc $
-->


<!-- ========== Defined Types ============================================= -->


<!-- An "AttributeName" is the identifier of a page, request, session, or
     application scope attribute.
-->
<!ENTITY % AttributeName "CDATA">


<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
     and also serves as the name of the corresponding scripting variable
     and the name of the JSP attribute under which the bean is accessed.
     Therefore, it must conform to the rules for a Java identifier.
-->
<!ENTITY % BeanName "CDATA">


<!-- A "Boolean" is the string representation of a boolean (true or false)
     variable.
-->
<!ENTITY % Boolean "(true|false|yes|no)">


<!-- A "ClassName" is the fully qualified name of a Java class that is
     instantiated to provide the functionality of the enclosing element.
-->
<!ENTITY % ClassName "CDATA">


<!-- An "Integer" is a character string consisting solely of numeric digits,
     optionally preceeded by a minus sign, that can be converted to a
     32-bit integer.
-->
<!ENTITY % Integer "CDATA">


<!-- A "Location" is a relative path, delimited by "/" characters, that
     defines the location of a resource relative to the location of the
     Struts configuration file itself.
-->
<!ENTITY % Location "#PCDATA">


<!-- A "PropName" is the name of a JavaBeans property, and must begin with
     a lower case letter and contain only characters that are legal in a
     Java identifier.
-->
<!ENTITY % PropName "CDATA">


<!-- A "RequestPath" is an module-relative URI path, beginning with a
     slash, that identifies a mapped resource (such as a JSP page or a servlet)
     within this web application.
-->
<!ENTITY % RequestPath "CDATA">


<!-- The name of a JSP bean scope within which such a form bean may be
     accessed.
-->
<!ENTITY % RequestScope "(request|session)">


<!-- ========== Top Level Elements ======================================== -->


<!-- The "struts-config" element is the root of the configuration file
     hierarchy, and contains nested elements for all of the other
     configuration settings.
-->
<!ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
<!ATTLIST struts-config  id             ID              #IMPLIED>


<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
     Standard Extension]. The individual DataSource objects are configured through
     nested <data-source> elements.
-->
<!ELEMENT data-sources (data-source*)>
<!ATTLIST data-sources   id             ID              #IMPLIED>


<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
     Extension] that will be instantiated, configured, and made available as a
     servlet context attribute (or "application-scope bean"). Any object can be
     specified so long as it implements [javax.sql.DataSource] and can be
     configured entirely from JavaBean properties. The following attributes
     are required:

     className       The configuration bean for this DataSource object. If
                     specified, the object must be a subclass of the default
                     configuration bean.
                     ["org.apache.struts.config.DataSourceConfig"]

     key             Servlet context attribute key under which this data source
                     will be stored.  Default is the value specified by string
                     constant defined by Globals.DATA_SOURCE_KEY. The application
                     module prefix (if any) is appended to the key
                     (${key}$prefix}).
                     [org.apache.struts.Globals.DATA_SOURCE_KEY]

                     NOTE: The application module prefix includes the leading
                     slash, so the default datasource for a module named "foo" is
                     stored under "org.apache.struts.action.DATA_SOURCE/foo".

     type            Fully qualified Java class name for this data source object.
                     The class must implement DataSource [javax.sql.DataSource],
                     and the object must be configurable entirely from JavaBean
                     properties.
-->
<!ELEMENT data-source (set-property*)>
<!ATTLIST data-source    id             ID              #IMPLIED>
<!ATTLIST data-source    className      %ClassName;     #IMPLIED>
<!ATTLIST data-source    key            %AttributeName; #IMPLIED>
<!ATTLIST data-source    type           %ClassName;     #IMPLIED>


<!-- The "form-beans" element describes the set of form bean descriptors for this
     module. The following attributes are defined:

     type            Fully qualified Java class to use when instantiating
                     ActionFormBean objects. If specified, the object must be a
                     subclass of the default class type.

                     WARNING:  For Struts 1.0, this value is ignored.  You
                     can set the default implementation class name with the
                     "formBean" initialization parameter to the Struts
                     controller servlet.
-->
<!ELEMENT form-beans (form-bean*)>
<!ATTLIST form-beans     id             ID              #IMPLIED>
<!ATTLIST form-beans     type           %ClassName;     #IMPLIED>


<!-- The "form-bean" element describes an ActionForm subclass
     [org.apache.struts.action.ActionForm] that can be referenced by an "action"
     element.


The "form-bean" element describes a particular form bean, which is a
     JavaBean that implements the org.apache.struts.action.ActionForm
     class.  The following attributes are defined:

     className       The configuration bean for this form bean object. If
                     specified, the object must be a subclass of the default
                     configuration bean.
                     ["org.apache.struts.config.FormBeanConfig"]
                     如果你不想使用标准的JavaBean “org.apache.struts.config.FormBeanConfig”,
                     可以定义自己的类,他必须是“org.apache.struts.config.FormBeanConfig”的一个子类。

     dynamic         If the form bean type is a  DynaActionForm subclass (that you
                     created), then (and only then) set this attribute to "true".
                     If the type is set to the default DynaActionForm or any
                     conventional ActionForm subclass, then this attribute can be
                     omitted.
                     [true] if type is "org.apache.struts.action.DynaActionForm"
                     [false] otherwise  DEPRECATED - THIS IS NOW DETERMINED
                     DYNAMICALLY BASED ON THE SPECIFIED IMPLEMENTATION CLASS.
                     不赞成使用。Struts框架将根据form-bean的类型自动确定它的值。

     name            The unique identifier for this form bean. Referenced by the
                     <action> element to specify which form bean to use with its
                     request.
                     该 form bean 的唯一标识,在子程序中必须唯一。
                     该属性是必须的。

     type            Fully qualified Java class name of the ActionForm subclass
                     to use with this form bean.
                     扩展org.apache.struts.action.ActionForm的一个子类。或指定为
                     org.apache.struts.action.DynaActionForm,则Struts将动态生成一个
                     org.apache.struts.action.DynaActionForm的实例。
                     该属性是必须的。
-->
<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
<!ATTLIST form-bean      id             ID              #IMPLIED>
<!ATTLIST form-bean      className      %ClassName;     #IMPLIED>
<!ATTLIST form-bean      dynamic        %Boolean;       #IMPLIED>
<!ATTLIST form-bean      name           %BeanName;      #REQUIRED>
<!ATTLIST form-bean      type           %ClassName;     #REQUIRED>


<!-- The "form-property" element describes a JavaBean property that can be used to
     configure an instance of a DynaActionForm or a subclass thereof. This element
     is only utilized when the "type" attribute of the enclosing "form-bean" element
     is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
     a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
     enclosing <form-bean> element must be set to "true". Since Struts 1.1.
     若form bean 的type属性为org.apache.struts.action.DynaActionForm,则可为其设置form property子元素,
     用来指定form bean的动态属性。

     className       The configuration bean for this form property object. If
                     specified, the object must be a subclass of the default
                     configuration bean.
                     ["org.apache.struts.config.FormPropertyConfig"]
                     如果不想使用标准的 org.apache.struts.config.FormPropertyConfig ,
                     可以自己定义他的一个子类。

     initial         String representation of the initial value for this property.
                     If not specified, primitives will be initialized to zero and
                     objects initialized to the zero-argument instantiation of that
                     object class.  For example, Strings will be initialized to ""
                     表示该属性的初始值。如果不指定,则原始值初始化为0,对象值初始化为null。


     name            The name of the JavaBean property described by this element.
              属性名。
              该属性是必须的。

     size            The number of array elements to create if the value of the
                     "type" attribute specifies an array, but there is no value
                     specified for the "initial" attribute.

     type            Fully qualified Java class name of the field underlying this
                     property, optionally followed by "[]" to indicate that the
                     field is indexed.
                     属性的数据类型。必须是完全限定的Java类名。后面的可选项[]表示该属性是被索引的。
                     该属性是必须的。
                     支持的类型有:
                       java.lang.BigDecimal
                       java.lang.BigInteger
                       boolean and java.lang.Boolean
                       byte and java.lang.Byte
                       char and java.lang.Character
                       java.lang.Class
                       double and java.lang.Double
                       float and java.lang.Float
                       int and java.lang.Integer
                       long and java.lang.Long
                       short and java.lang.Short
                       java.lang.String
                       java.sql.Date
                       java.sql.Time
                       java.sql.Timestamp
                     也可以设置为他们的数组(eg:String[]),
                     也可以指定为Map类型或它的派生类如java.util.HashMap,
                     也可以指定为实现List接口的类,如java.util.ArrayList
-->
<!ELEMENT form-property  (set-property*)>
<!ATTLIST form-property  className      %ClassName;     #IMPLIED>
<!ATTLIST form-property  initial        CDATA           #IMPLIED>
<!ATTLIST form-property  name           %PropName;      #REQUIRED>
<!ATTLIST form-property  size           %Integer;       #IMPLIED>
<!ATTLIST form-property  type           %ClassName;     #REQUIRED>


<!-- The "global-exceptions" element describes a set of exceptions that might be
     thrown by an Action object. The handling of individual exception types is
     configured through nested exception elements. An <action> element may
     override a global exception handler by registering a local exception handler
     for the same exception type. Since Struts 1.1.
-->
<!ELEMENT global-exceptions (exception*)>
<!ATTLIST global-exceptions id          ID              #IMPLIED>


<!-- The "exception" element registers an ExceptionHandler for an exception type.
     The following attributes are defined:

    bundle           Servlet context attribute for the message resources bundle
                     associated with this handler. The default attribute is the
                     value specified by the string constant declared at
                     Globals.MESSAGES_KEY.
                     [org.apache.struts.Globals.MESSAGES_KEY]
                     指定有<message-resources>元素定义的某个资源束,该值与
                     message-resources元素的key属性对应。
                     默认值为org.apache.struts.Globals.MESSAGES_KEY,表示使用默认资源束。

    className        The configuration bean for this ExceptionHandler object.
                     If specified, className must be a subclass of the default
                     configuration bean
                     ["org.apache.struts.config.ExceptionConfig"]
                     指定要实例化的配置对象

    handler          Fully qualified Java class name for this exception handler.
                     ["org.apache.struts.action.ExceptionHandler"]
                     指定异常处理程序的的完全限定的类名

    key              The key to use with this handler's message resource bundle
                     that will retrieve the error message template for this
                     exception.
                     指定资源束中的信息关键字
                     该属性是必须的

    path             The module-relative URI to the resource that will complete
                     the request/response if this exception occurs.
                     指定该异常被触发时重定向的URI

    scope            The context ("request" or "session") that is used to access
                     the ActionError object [org.apache.struts.action.ActionError]
                     for this exception.
                     指定ActionError对象的访问范围

    type             Fully qualified Java class name of the exception type to
                     register with this handler.
                     指定异常类型,当Action抛出type指定的异常时才进行相应的处理。
                     该属性是必须的
-->
<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
<!ATTLIST exception      id             ID              #IMPLIED>
<!ATTLIST exception      bundle         %AttributeName; #IMPLIED>
<!ATTLIST exception      className      %ClassName;     #IMPLIED>
<!ATTLIST exception      handler        %ClassName;     #IMPLIED>
<!ATTLIST exception      key            CDATA           #REQUIRED>
<!ATTLIST exception      path           %RequestPath;   #IMPLIED>
<!ATTLIST exception      scope          CDATA           #IMPLIED>
<!ATTLIST exception      type           %ClassName;     #REQUIRED>


<!-- The "global-forwards" element describes a set of ActionForward objects
     [org.apache.struts.action.ActionForward] that are available to all Action
     objects as a return value. The individual ActionForwards are configured
     through nested <forward> elements. An <action> element may override a global
     forward by defining a local <forward> of the same name.
    

     type            Fully qualified Java class to use when instantiating
                     ActionForward objects.  If specified, the object must be a
                     subclass of the default class type.

                     WARNING:  For Struts 1.0, this value is ignored.  You
                     can set the default implementation class name with the
                     "forward" initialization parameter to the Struts
                     controller servlet.//////////???????????????
-->
<!ELEMENT global-forwards (forward*)>
<!ATTLIST global-forwards id            ID              #IMPLIED>
<!ATTLIST global-forwards type          %ClassName;     #IMPLIED>


<!-- The "forward" element describes an ActionForward that is to be made
     available to an Action as a return value. An ActionForward is referenced by
     a logical name and encapsulates a URI. A "forward" element may be used to
     describe both global and local ActionForwards. Global forwards are available
     to all the Action objects in the module. Local forwards can be
     nested within an <action> element and only available to an Action object
     when it is invoked through that ActionMapping.

     className       Fully qualified Java class name of ActionForward
                     subclass to use for this object.
                     ["org.apache.struts.action.ActionForward"]
                     自定义一个ActionForward的子类。

    contextRelative  Set this to "true" if, in a modular application, the path
                     attribute starts with a slash "/" and should be considered
                     relative to the entire web application rather than the module.
                     Since Struts 1.1.
                     [false]
                     如果path属性以"/"开头且被当作整个应用程序而不是
                     一个模块的相关的资源,则设置为"true"。这样。path指定的路径资源可以驻留在
                     整个应用程序中。

     name            The unique identifier for this forward. Referenced by the
                     Action object at runtime to select - by its logical name -
                     the resource that should complete the request/response.
                     表示该forward的唯一标识,action通过指定此值来调用该forward
                     该属性是必须的。

     path            The module-relative or context-relative path to the resources
                     that is encapsulated by the logical name of this ActionForward.
                     If the path is to be considered context-relative when used in
                     a modular application, then the contextRelative attribute
                     should be set to "true". This value should begin with a slash
                     ("/") character.
                     被模块相关或上下文相关的资源路径。
                     这个属性是必须的,且以"/"开头。

     redirect        Set to "true" if a redirect instruction should be issued to
                     the user-agent so that a new request is issued for this
                     forward's resource. If true,  RequestDispatcher.Redirect is
                     called. If "false", RequestDispatcher.forward is called instead.
                     [false]
                     用于决定RequestProcessor应该执行forward()还是redirect()。
-->
<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
<!ATTLIST forward        id             ID              #IMPLIED>
<!ATTLIST forward        className      %ClassName;     #IMPLIED>
<!ATTLIST forward        contextRelative %Boolean;      #IMPLIED>
<!ATTLIST forward        name           CDATA           #REQUIRED>
<!ATTLIST forward        path           %RequestPath;   #REQUIRED>
<!ATTLIST forward        redirect       %Boolean;       #IMPLIED>


<!-- The "action-mappings" element describes a set of ActionMapping objects
     [org.apache.struts.action.ActionMapping] that are available to process
     requests matching the url-pattern our ActionServlet registered with the
     container. The individual ActionMappings are configured through nested
     <action> elements. The following attributes are defined:

     type           Fully qualified Java class to use when instantiating
                    ActionMapping objects. If specified, the object must be a
                    subclass of the default class type.

                    WARNING:  For Struts 1.0, this value is ignored.  You
                    can set the default implementation class name with the
                    "mapping" initialization parameter to the Struts
                    controller servlet.
-->
<!ELEMENT action-mappings (action*)>
<!ATTLIST action-mappings id             ID              #IMPLIED>
<!ATTLIST action-mappings type           %ClassName;     #IMPLIED>


<!-- The "action" element describes an ActionMapping object that is to be used
     to process a request for a specific module-relative URI. The following
     attributes are defined:

     attribute       Name of the request-scope or session-scope attribute that
                     is used to access our ActionForm bean, if it is other than
                     the bean's specified "name". Optional if "name" is specified,
                     else not valid.
                     请求或会话作用域的名称。
                     只有在name属性中指定了表单bean,此处的值才有用,默认为没有值。
                     若该值与name属性的值不同,则优先调用此值。

     className       The fully qualified Java class name of the ActionMapping
                     subclass to use for this action mapping object. Defaults to
                     the type specified by the enclosing <action-mappings>
                     element or to "org.apache.struts.action.ActionMapping" if
                     not specified.
                     ["org.apache.struts.action.ActionMapping"]
                     自定义ActionMapping

     forward         Module-relative path of the servlet or other resource that
                     will process this request, instead of the Action class
                     specified by "type".  The path WILL NOT be processed
                     through the "forwardPattern" attribute that is configured
                     on the "controller" element for this module.
                     Exactly one of "forward", "include", or "type" must be
                     specified.
                     转向相关的servlet或JSP资源。
                     forward、include和type属性互斥,且必须指定其中的一个值。
                    

     include         Module-relative path of the servlet or other resource that
                     will process this request, instead of the Action class
                     specified by "type".  The path WILL NOT be processed
                     through the "forwardPattern" attribute that is configured
                     on the "controller" element for this module.
                     Exactly one of "forward", "include", or "type" must be
                     specified.
                     到servlet或JSP资源的路径,与响应一起被引用。
                     forward、include和type属性互斥,且必须指定其中的一个值。

     input           Module-relative path of the action or other resource to
                     which control should be returned if a validation error is
                     encountered. Valid only when "name" is specified. Required
                     if "name" is specified and the input bean returns
                     validation errors. Optional if "name" is specified and the
                     input bean does not return validation errors.
                     当form bean遇到验证错误时,指向应用程序相关的action或其他资源路径。
                     只有在name属性中指定了表单bean,此处的值才有用,默认为没有值。

     name            Name of the form bean, if any, that is associated with this
                     action mapping.
                     与action动作相关的表单。可选项。默认为没有值。

     path            The module-relative path of the submitted request, starting
                     with a "/" character, and without the filename extension if
                     extension mapping is used.
                     提交请求的应用程序相关路径,以"/"开头。

                     NOTE:  Do *not* include a period in your path name,
                     because it will look like a filename extension and
                     cause your Action to not be located.

     parameter       General-purpose configuration parameter that can be used to
                     pass extra information to the Action object selected by
                     this action mapping.
                     配置参数。可以在execute()方法中通过ActionMapping的getParameter()方法来获取它。

     prefix          Prefix used to match request parameter names to ActionForm
                     property names, if any. Optional if "name" is specified,
                     else not allowed.
                     用于将请求参数与form bean里的属性相匹配。

     roles           Comma-delimited list of security role names that are allowed
                     access to this ActionMapping object. Since Struts 1.1.
                     逗号界定的安全角色列表。
                     在请求时,RequestProcessor检查用户是否为其中的一个角色。

     scope           The context ("request" or "session") that is used to
                     access our ActionForm bean, if any.  Optional if "name" is
                     specified, else not valid.
                     form bean的范围。
                     默认值为session.

     suffix          Suffix used to match request parameter names to ActionForm
                     bean property names, if any. Optional if "name" is
                     specified, else not valid.
                     用于将请求参数与form bean里的属性相匹配。
                    

     type            Fully qualified Java class name of the Action subclass
                     [org.apache.struts.action.Action] that will process requests
                     for this action mapping. Not valid if either the "forward"
                     or "include" attribute is specified.  Exactly one of
                     "forward", "include", or "type" must be specified.
                     扩展org.apache.struts.action.Action类的完全限定的Java类名。
                      forward、include和type属性互斥,且必须指定其中的一个值。

     unknown         Set to "true" if this object should be configured as the
                     default action mapping for this module. If a request does not
                     match another object, it will be passed to the ActionMapping
                     object with unknown set to "true". Only one ActionMapping
                     can be marked as "unknown" within a module.
                     [false]
                     说明该action是否被配置为应用程序的默认action。
                     如果设置为true。则该action处理任何不被其他action处理的请求。
                     每个应用程序只能有一个action的unknown属性为true。

     validate        Set to "true" if the validate method of the ActionForm bean
                     should be called prior to calling the Action object for this
                     action mapping, or set to "false" if you do not want the
                     validate method called.
                     [true]
                     说明name属性指定的form bean 的validate()方法是否被优先调用。
-->
<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
<!ATTLIST action         id             ID              #IMPLIED>
<!ATTLIST action         attribute      %BeanName;      #IMPLIED>
<!ATTLIST action         className      %ClassName;     #IMPLIED>
<!ATTLIST action         forward        %RequestPath;   #IMPLIED>
<!ATTLIST action         include        %RequestPath;   #IMPLIED>
<!ATTLIST action         input          %RequestPath;   #IMPLIED>
<!ATTLIST action         name           %BeanName;      #IMPLIED>
<!ATTLIST action         parameter      CDATA           #IMPLIED>
<!ATTLIST action         path           %RequestPath;   #REQUIRED>
<!ATTLIST action         prefix         CDATA           #IMPLIED>
<!ATTLIST action         roles          CDATA           #IMPLIED>
<!ATTLIST action         scope          %RequestScope;  #IMPLIED>
<!ATTLIST action         suffix         CDATA           #IMPLIED>
<!ATTLIST action         type           %ClassName;     #IMPLIED>
<!ATTLIST action         unknown        %Boolean;       #IMPLIED>
<!ATTLIST action         validate       %Boolean;       #IMPLIED>


<!-- The "controller" element describes the ControllerConfig bean
     [org.apache.struts.config.ControllerConfig] that encapsulates
     a module's runtime configuration.
     struts1.1新增特性。之前版本中ActionServlet包含了控制器的功能。
     The following attributes are defined:

     bufferSize      The size of the input buffer used when processing
                     file uploads.
                     [4096]
                     处理上传文件时的输入缓冲大小。

     className       Fully qualified Java class name of the
                     ControllerConfig subclass for this controller object.
                     If specified, the object must be a subclass of the
                     default class.
                     ["org.apache.struts.config.ControllerConfig"]
                     指定控制器配置对象类,如果没有指定则使用默认值 org.apache.struts.config.ControllerConfig

     contentType     Default content type (and optional character encoding) to
                     be set on each response. May be overridden by the Action,
                     JSP, or other resource to which the request is forwarded.
                     ["text/html"]
                     为每个响应配置默认的内容类型和字符编码。
                     即便此处指定了值。动作或JSP页面也可重载它。

     debug           Debugging detail level for this module. [0]
                     DEPRECATED - configure the logging detail level
                     in your underlying logging implementation.
                     指定应用程序的调试级别。该值在整个框架包中确定对内部发生事件的
                     记录信息的长度。值越大,信息长度越大。
                     不赞成使用。

     forwardPattern  Replacement pattern defining how the "path" attribute of a
                     <forward> element is mapped to a context-relative URL when
                     it starts with a slash (and when the contextRelative
                     property is false). This value may consist of any
                     combination of the following:
                     - "$M" - Replaced by the module prefix of this module
                     - "$P" - Replaced by the "path" attribute of the  selected
                     "forward" element
                     - "$$" - Causes a literal dollar sign to be rendered
                     - "$x" - (Where "x" is any character not defined above)
                     Silently swallowed, reserved for future use
                     If not specified, the default forwardPattern is "$M$P",
                     which is consistent with the previous behavior of
                     forwards.  Since Struts 1.1.  ["$M$P"]
                     定义forward元素的path属性在以斜线开始时(在context-relative
                     属性为false时),如何映射上下文相关的URL的替换模式。
                     该值由下列任意组合而成:
                     * $M - 由子程序的应用程序前缀替换
                     * $P - 由被选择的forward元素的path替换。
                     * $$ - 生成一个美圆符号$
                     * $x - (x是上面没有定义的任何字符)- 没有说明,以备后用。
                     默认值为$M$P 与前面的forwards的硬编码行为一致。

     inputForward    Set to "true" if you want the "input" attribute of
                     <action> elements to be the name of a local or global
                     ActionForward, which will then be used to calculate the
                     ultimate URL. Set to "false" (the default) to treat the
                     "input" parameter of <action> elements as a
                     module-relative path to the resource
                     to be used as the input form. Since Struts 1.1.
                     [false]
                     如果要使action元素的input参数成为用于计算最终URL的本地或全局
                     ActionForward元素的名称,就设置为"true".设置为"false"表示将
                     action元素的input参数作为输入表单使用的资源的子程序相关路径。

     locale          Set to "true" if you want a Locale object stored in the
                     user's session if not already present.
                     [true]
                     如果希望将一个不存在的Locale对象保存在用户的session会话中,则设置为true.

     maxFileSize     The maximum size (in bytes) of a file to be accepted as a
                     file upload.  Can be expressed as a number followed by a
                     "K", "M", or "G", which are interpreted to mean kilobytes,
                     megabytes, or gigabytes, respectively.
                     ["250M"]
                     所上传文件的最大值。

     memFileSize     The maximum size (in bytes) of a file whose contents will
                     be retained in memory after uploading. Files larger than
                     this threshold will be written to some alternative storage
                     medium, typically a hard disk. Can be expressed as a number
                     followed by a "K", "M", or "G", which are interpreted to
                     mean kilobytes, megabytes, or gigabytes, respectively.
                     ["256K"]
                     上传文件时文件内容驻留在内存的最大值。超过这个值就进行相关的存储。

     multipartClass  The fully qualified Java class name of the multipart
                     request handler class to be used with this module.
                     ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
                     要使用的多方请求处理程序类的完全限定的Java类名。该属性在从用户的
                     本地系统想服务器上传文件是使用。

     nocache         Set to "true" if you want the controller to add HTTP
                     headers for defeating caching to every response from
                     this module.  [false]
                     决定是否在每个响应中设置nochache的HTTP头。

     pagePattern     Replacement pattern defining how the "page" attribute of
                     custom tags using it is mapped to a context-relative URL
                     of the corresponding resource.  This value may consist of
                     any combination of the following:
                     - "$M" - Replaced by the module prefix of this module
                     - "$P" - Replaced by the value of the "page" attribute
                     - "$$" - Causes a literal dollar sign to be rendered
                     - "$x" - (Where "x" is any character not defined above)
                              Silently swallowed, reserved for future use
                     If not specified, the default forwardPattern is
                     "$M$P", which is consistent with previous hard coded
                     behavior of URL evaluation for "page" attributes.
                     ["$M$P"]
                     一个替换模式。用于定义使用该属性的自定义标记page属性如何
                     映射到相应的资源上下文相关的URL
                     该值由下列任意组合而成:
                     * $M - 由子程序的应用程序前缀替换
                     * $P - 由被选择的forward元素的path替换。
                     * $$ - 生成一个美圆符号$
                     * $x - (x是上面没有定义的任何字符)- 没有说明,以备后用。
                     默认值为$M$P 与前面的forwards的硬编码行为一致。

     processorClass  The fully qualified Java class name of the
                     RequestProcessor subclass to be used with this module.
                     ["org.apache.struts.action.RequestProcessor"]
                     指定子类RequestProcessor

     tempDir         Temporary working directory to use when processing
                     file uploads.
                     [{Directory provided by servlet container}]
                     在文件上传过程中用来存储文件的临时目录。
-->
<!ELEMENT controller     (set-property*)>
<!ATTLIST controller     id             ID              #IMPLIED>
<!ATTLIST controller     bufferSize     %Integer;       #IMPLIED>
<!ATTLIST controller     className      %ClassName;     #IMPLIED>
<!ATTLIST controller     contentType    CDATA           #IMPLIED>
<!ATTLIST controller     debug          %Integer;       #IMPLIED>
<!ATTLIST controller     forwardPattern CDATA           #IMPLIED>
<!ATTLIST controller     inputForward   %Boolean;       #IMPLIED>
<!ATTLIST controller     locale         %Boolean;       #IMPLIED>
<!ATTLIST controller     maxFileSize    CDATA           #IMPLIED>
<!ATTLIST controller     memFileSize    CDATA           #IMPLIED>
<!ATTLIST controller     multipartClass %ClassName;     #IMPLIED>
<!ATTLIST controller     nocache        %Boolean;       #IMPLIED>
<!ATTLIST controller     pagePattern    CDATA           #IMPLIED>
<!ATTLIST controller     processorClass %ClassName;     #IMPLIED>
<!ATTLIST controller     tempDir        CDATA           #IMPLIED>


<!-- The "message-resources" element describes a MessageResources object with
     message templates for this module. The following attributes are defined:

     className       The configuration bean for this message resources object.
                     If specified, the object must be a subclass of the default
                     configuration bean.
                     ["org.apache.struts.config.MessageResourcesConfig"]
                     此资源束的配置bean

     factory         Fully qualified Java class name of the
                     MessageResourcesFactory subclass to use for this message
                     resources object.
                     ["org.apache.struts.util.PropertyMessageResourcesFactory"]
                     自定义MessageResourcesFactory的一个子类

     key             Servlet context attribute under which this message
                     resources bundle will be stored. The default attribute is
                     the value specified by the string constant at
                     [Globals.MESSAGES_KEY]. The module prefix (if
                     any) is appended to the key (${key}${prefix}).
                     [org.apache.struts.Globals.MESSAGES_KEY]
                     指定存储此资源束的上下文属性关键字。
                     默认值由org.apache.struts.Globals.MESSAGES_KEY指定。
                     一个应用程序只允许一个资源束设定为默认值。

                     NOTE: The module  prefix includes the leading
                     slash, so the default message resource bundle for a module
                     named "foo" is stored under
                     "org.apache.struts.action.MESSAGE/foo".////////////////////???????????????????

     null            Set to "true" if you want our message resources to return a
                     null string for unknown message keys, or "false" to return a
                     message with the bad key value.
                     表示缺少信息时是否返回空值

     parameter       Configuration parameter to be passed to the createResources
                     method of our factory object.
                     资源束的名称。如果资源束名称为cn.rolia.ApplicationResources.properties
                     则此处的值设为:con.rolia.ApplicationResources
-->
<!ELEMENT message-resources (set-property*)>
<!ATTLIST message-resources id          ID              #IMPLIED>
<!ATTLIST message-resources className   %ClassName;     #IMPLIED>
<!ATTLIST message-resources factory     %ClassName;     #IMPLIED>
<!ATTLIST message-resources key         %AttributeName; #IMPLIED>
<!ATTLIST message-resources null        %Boolean;       #IMPLIED>
<!ATTLIST message-resources parameter   CDATA           #REQUIRED>


<!-- The "plug-in" element specifies the fully qualified class name of a
     general-purpose application plug-in module that receives notification of
     application startup and shutdown events. An instance of the specified class
     is created for each element, and can be configured with nested <set-property>
     elements. The following attributes are supported:

     className       Fully qualified Java class name of the plug-in class; must
                     implement [org.apache.struts.action.PlugIn].
                     具体的plug-in类,必须继承org.apache.struts.action.PlugIn
                     并实现init()方法和destroy()方法
-->
<!ELEMENT plug-in           (set-property*)>
<!ATTLIST plug-in           id          ID              #IMPLIED>
<!ATTLIST plug-in           className   %ClassName;     #REQUIRED>


<!-- ========== Subordinate Elements ====================================== -->


<!-- The "description" element contains descriptive (paragraph length) text
     about the surrounding element, suitable for use in GUI tools.
-->
<!ELEMENT description    (#PCDATA)>
<!ATTLIST description    id             ID              #IMPLIED>


<!-- The "display-name" element contains a short (one line) description of
     the surrounding element, suitable for use in GUI tools.
-->
<!ELEMENT display-name (#PCDATA)>
<!ATTLIST display-name   id             ID              #IMPLIED>


<!-- The "icon" element contains a small-icon and large-icon element which
     specify the location, relative to the Struts configuration file, for small
     and large images used to represent the surrounding element in GUI tools.
-->
<!ELEMENT icon           (small-icon?, large-icon?)>
<!ATTLIST icon           id             ID              #IMPLIED>


<!-- The "large-icon" element specifies the location, relative to the Struts
     configuration file, of a resource containing a large (32x32 pixel)
     icon image.
-->
<!ELEMENT large-icon     (%Location;)>
<!ATTLIST large-icon     id             ID              #IMPLIED>


<!-- The "set-property" element specifies the method name and initial value of
     an additional JavaBean configuration property. When the object representing
     the surrounding element is instantiated, the accessor for the indicated
     property is called and passed the indicated value. The "set-property"
     element is especially useful when a custom subclass is used with
     <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
     can be passed whatever other properties may be required to configure the
     object without changing how the struts-config is parsed.

     property        Name of the JavaBeans property whose setter method
                     will be called.

     value           String representation of the value to which this
                     property will be set, after suitable type conversion
-->
<!ELEMENT set-property   EMPTY>
<!ATTLIST set-property   id             ID              #IMPLIED>
<!ATTLIST set-property   property       %PropName;      #REQUIRED>
<!ATTLIST set-property   value          CDATA           #REQUIRED>


<!-- The "small-icon" element specifies the location, relative to the Struts
     configuration file, of a resource containing a small (16x16 pixel)
     icon image.
-->
<!ELEMENT small-icon     (%Location;)>
<!ATTLIST small-icon     id             ID              #IMPLIED>


 

阅读(3678) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册