J2EE开发常用
来源:互联网 发布:多益网络总裁 编辑:程序博客网 时间:2024/05/15 08:33
web-app_2_4.xsd
- <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.4">
- <xsd:annotation>
<xsd:documentation>@(#)web-app_2_4.xsds 1.61 04/04/16</xsd:documentation>
</xsd:annotation>
- <xsd:annotation>
<xsd:documentation>Copyright 2003 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and other countries. This document and the technology which it describes are distributed under licenses restricting their use, copying, distribution, and decompilation. No part of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE, JavaServer Pages, Enterprise JavaBeans and the Java Coffee Cup logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Federal Acquisitions: Commercial Software - Government Users Subject to Standard License Terms and Conditions.</xsd:documentation>
</xsd:annotation>
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
This is the XML Schema for the Servlet 2.4 deployment descriptor.
The deployment descriptor must be named "WEB-INF/web.xml" in the
web application's war file. All Servlet deployment descriptors
must indicate the web application schema by using the J2EE
namespace:
http://java.sun.com/xml/ns/j2ee
and by indicating the version of the schema by
using the version element as shown below:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="..."
version="2.4">
...
</web-app>
The instance documents may indicate the published version of
the schema using the xsi:schemaLocation attribute for J2EE
namespace with the following location:
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
]]>
</xsd:documentation>
</xsd:annotation>
- <xsd:annotation>
<xsd:documentation>The following conventions apply to all J2EE deployment descriptor elements unless indicated otherwise. - In elements that specify a pathname to a file within the same JAR file, relative filenames (i.e., those not starting with "/") are considered relative to the root of the JAR file's namespace. Absolute filenames (i.e., those starting with "/") also specify names in the root of the JAR file's namespace. In general, relative names are preferred. The exception is .war files where absolute names are preferred for consistency with the Servlet API.</xsd:documentation>
</xsd:annotation>
<xsd:include schemaLocation="j2ee_1_4.xsd" />
<xsd:include schemaLocation="jsp_2_0.xsd" />
- <!-- ****************************************************
-->
- <xsd:element name="web-app" type="j2ee:web-appType">
- <xsd:annotation>
<xsd:documentation>The web-app element is the root of the deployment descriptor for a web application. Note that the sub-elements of this element can be in the arbitrary order. Because of that, the multiplicity of the elements of distributable, session-config, welcome-file-list, jsp-config, login-config, and locale-encoding-mapping-list was changed from "?" to "*" in this schema. However, the deployment descriptor instance file must not contain multiple elements of session-config, jsp-config, and login-config. When there are multiple elements of welcome-file-list or locale-encoding-mapping-list, the container must concatinate the element contents. The multiple occurance of the element distributable is redundant and the container treats that case exactly in the same way when there is only one distributable.</xsd:documentation>
</xsd:annotation>
- <xsd:unique name="web-app-servlet-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The servlet element contains the name of a servlet. The name must be unique within the web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:servlet" />
<xsd:field xpath="j2ee:servlet-name" />
</xsd:unique>
- <xsd:unique name="web-app-filter-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The filter element contains the name of a filter. The name must be unique within the web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:filter" />
<xsd:field xpath="j2ee:filter-name" />
</xsd:unique>
- <xsd:unique name="web-app-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The ejb-local-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the web application's environment and is relative to the java:comp/env context. The name must be unique within the web application. It is recommended that name is prefixed with "ejb/".</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:ejb-local-ref" />
<xsd:field xpath="j2ee:ejb-ref-name" />
</xsd:unique>
- <xsd:unique name="web-app-ejb-ref-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The ejb-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the web application's environment and is relative to the java:comp/env context. The name must be unique within the web application. It is recommended that name is prefixed with "ejb/".</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:ejb-ref" />
<xsd:field xpath="j2ee:ejb-ref-name" />
</xsd:unique>
- <xsd:unique name="web-app-resource-env-ref-uniqueness">
- <xsd:annotation>
<xsd:documentation>The resource-env-ref-name element specifies the name of a resource environment reference; its value is the environment entry name used in the web application code. The name is a JNDI name relative to the java:comp/env context and must be unique within a web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:resource-env-ref" />
<xsd:field xpath="j2ee:resource-env-ref-name" />
</xsd:unique>
- <xsd:unique name="web-app-message-destination-ref-uniqueness">
- <xsd:annotation>
<xsd:documentation>The message-destination-ref-name element specifies the name of a message destination reference; its value is the environment entry name used in the web application code. The name is a JNDI name relative to the java:comp/env context and must be unique within a web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:message-destination-ref" />
<xsd:field xpath="j2ee:message-destination-ref-name" />
</xsd:unique>
- <xsd:unique name="web-app-res-ref-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The res-ref-name element specifies the name of a resource manager connection factory reference. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:resource-ref" />
<xsd:field xpath="j2ee:res-ref-name" />
</xsd:unique>
- <xsd:unique name="web-app-env-entry-name-uniqueness">
- <xsd:annotation>
<xsd:documentation>The env-entry-name element contains the name of a web application's environment entry. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a web application.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:env-entry" />
<xsd:field xpath="j2ee:env-entry-name" />
</xsd:unique>
- <xsd:key name="web-app-role-name-key">
- <xsd:annotation>
<xsd:documentation>A role-name-key is specified to allow the references from the security-role-refs.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:security-role" />
<xsd:field xpath="j2ee:role-name" />
</xsd:key>
- <xsd:keyref name="web-app-role-name-references" refer="j2ee:web-app-role-name-key">
- <xsd:annotation>
<xsd:documentation>The keyref indicates the references from security-role-ref to a specified role-name.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="j2ee:servlet/j2ee:security-role-ref" />
<xsd:field xpath="j2ee:role-link" />
</xsd:keyref>
</xsd:element>
- <!-- ****************************************************
-->
- <xsd:complexType name="auth-constraintType">
- <xsd:annotation>
<xsd:documentation>The auth-constraintType indicates the user roles that should be permitted access to this resource collection. The role-name used here must either correspond to the role-name of one of the security-role elements defined for this web application, or be the specially reserved role-name "*" that is a compact syntax for indicating all roles in the web application. If both "*" and rolenames appear, the container interprets this as all roles. If no roles are defined, no user is allowed access to the portion of the web application described by the containing security-constraint. The container matches role names case sensitively when determining access.</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="description" type="j2ee:descriptionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="role-name" type="j2ee:role-nameType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="auth-methodType">
- <xsd:annotation>
<xsd:documentation>The auth-methodType is used to configure the authentication mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization constraint, a user must have authenticated using the configured mechanism. Legal values are "BASIC", "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific authentication scheme. Used in: login-config</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
<xsd:restriction base="j2ee:string" />
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="dispatcherType">
- <xsd:annotation>
<xsd:documentation>The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE, and ERROR. A value of FORWARD means the Filter will be applied under RequestDispatcher.forward() calls. A value of REQUEST means the Filter will be applied under ordinary client calls to the path or servlet. A value of INCLUDE means the Filter will be applied under RequestDispatcher.include() calls. A value of ERROR means the Filter will be applied under the error page mechanism. The absence of any dispatcher elements in a filter-mapping indicates a default of applying filters only under ordinary client calls to the path or servlet.</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:enumeration value="FORWARD" />
<xsd:enumeration value="INCLUDE" />
<xsd:enumeration value="REQUEST" />
<xsd:enumeration value="ERROR" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:simpleType name="encodingType">
- <xsd:annotation>
<xsd:documentation>The encodingType defines IANA character sets.</xsd:documentation>
</xsd:annotation>
- <xsd:restriction base="xsd:string">
<xsd:pattern value="[^s]+" />
</xsd:restriction>
</xsd:simpleType>
- <!-- ****************************************************
-->
- <xsd:complexType name="error-codeType">
- <xsd:annotation>
<xsd:documentation>The error-code contains an HTTP error code, ex: 404 Used in: error-page</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdPositiveIntegerType">
<xsd:pattern value="d{3}" />
<xsd:attribute name="id" type="xsd:ID" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="error-pageType">
- <xsd:annotation>
<xsd:documentation>The error-pageType contains a mapping between an error code or exception type to the path of a resource in the web application. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:choice>
<xsd:element name="error-code" type="j2ee:error-codeType" />
- <xsd:element name="exception-type" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
<xsd:documentation>The exception-type contains a fully qualified class name of a Java exception type.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
- <xsd:element name="location" type="j2ee:war-pathType">
- <xsd:annotation>
<xsd:documentation>The location element contains the location of the resource in the web application relative to the root of the web application. The value of the location must have a leading `/'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="filter-mappingType">
- <xsd:annotation>
<xsd:documentation>Declaration of the filter mappings in this web application is done by using filter-mappingType. The container uses the filter-mapping declarations to decide which filters to apply to a request, and in what order. The container matches the request URI to a Servlet in the normal way. To determine which filters to apply it matches filter-mapping declarations either on servlet-name, or on url-pattern for each filter-mapping element, depending on which style is used. The order in which filters are invoked is the order in which filter-mapping declarations that match a request URI for a servlet appear in the list of filter-mapping elements.The filter-name value must be the value of the filter-name sub-elements of one of the filter declarations in the deployment descriptor.</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="filter-name" type="j2ee:filter-nameType" />
- <xsd:choice>
<xsd:element name="url-pattern" type="j2ee:url-patternType" />
<xsd:element name="servlet-name" type="j2ee:servlet-nameType" />
</xsd:choice>
<xsd:element name="dispatcher" type="j2ee:dispatcherType" minOccurs="0" maxOccurs="4" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="filter-nameType">
- <xsd:annotation>
<xsd:documentation>The logical name of the filter is declare by using filter-nameType. This name is used to map the filter. Each filter name is unique within the web application. Used in: filter, filter-mapping</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
<xsd:extension base="j2ee:nonEmptyStringType" />
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="filterType">
- <xsd:annotation>
<xsd:documentation>The filterType is used to declare a filter in the web application. The filter is mapped to either a servlet or a URL pattern in the filter-mapping element, using the filter-name value to reference. Filters can access the initialization parameters declared in the deployment descriptor at runtime via the FilterConfig interface. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:group ref="j2ee:descriptionGroup" />
<xsd:element name="filter-name" type="j2ee:filter-nameType" />
- <xsd:element name="filter-class" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
<xsd:documentation>The fully qualified classname of the filter.</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name="init-param" type="j2ee:param-valueType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
<xsd:documentation>The init-param element contains a name/value pair as an initialization param of a servlet filter</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="form-login-configType">
- <xsd:annotation>
<xsd:documentation>The form-login-configType specifies the login and error pages that should be used in form based login. If form based authentication is not used, these elements are ignored. Used in: login-config</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:element name="form-login-page" type="j2ee:war-pathType">
- <xsd:annotation>
<xsd:documentation>The form-login-page element defines the location in the web app where the page that can be used for login can be found. The path begins with a leading / and is interpreted relative to the root of the WAR.</xsd:documentation>
</xsd:annotation>
</xsd:element>
- <xsd:element name="form-error-page" type="j2ee:war-pathType">
- <xsd:annotation>
<xsd:documentation>The form-error-page element defines the location in the web app where the error page that is displayed when login is not successful can be found. The path begins with a leading / and is interpreted relative to the root of the WAR.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="http-methodType">
- <xsd:annotation>
<xsd:documentation>The http-method contains an HTTP method recognized by the web-app, for example GET, POST, ...</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:enumeration value="GET" />
<xsd:enumeration value="POST" />
<xsd:enumeration value="PUT" />
<xsd:enumeration value="DELETE" />
<xsd:enumeration value="HEAD" />
<xsd:enumeration value="OPTIONS" />
<xsd:enumeration value="TRACE" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="locale-encoding-mapping-listType">
- <xsd:annotation>
<xsd:documentation>The locale-encoding-mapping-list contains one or more locale-encoding-mapping(s).</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="locale-encoding-mapping" type="j2ee:locale-encoding-mappingType" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="locale-encoding-mappingType">
- <xsd:annotation>
<xsd:documentation>The locale-encoding-mapping contains locale name and encoding name. The locale name must be either "Language-code", such as "ja", defined by ISO-639 or "Language-code_Country-code", such as "ja_JP". "Country code" is defined by ISO-3166.</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="locale" type="j2ee:localeType" />
<xsd:element name="encoding" type="j2ee:encodingType" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:simpleType name="localeType">
- <xsd:annotation>
<xsd:documentation>The localeType defines valid locale defined by ISO-639-1 and ISO-3166.</xsd:documentation>
</xsd:annotation>
- <xsd:restriction base="xsd:string">
<xsd:pattern value="[a-z]{2}(_|-)?([p{L}-p{Nd}]{2})?" />
</xsd:restriction>
</xsd:simpleType>
- <!-- ****************************************************
-->
- <xsd:complexType name="login-configType">
- <xsd:annotation>
<xsd:documentation>The login-configType is used to configure the authentication method that should be used, the realm name that should be used for this application, and the attributes that are needed by the form login mechanism. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="auth-method" type="j2ee:auth-methodType" minOccurs="0" />
- <xsd:element name="realm-name" type="j2ee:string" minOccurs="0">
- <xsd:annotation>
<xsd:documentation>The realm name element specifies the realm name to use in HTTP Basic authorization.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="form-login-config" type="j2ee:form-login-configType" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="mime-mappingType">
- <xsd:annotation>
<xsd:documentation>The mime-mappingType defines a mapping between an extension and a mime type. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:annotation>
<xsd:documentation>The extension element contains a string describing an extension. example: "txt"</xsd:documentation>
</xsd:annotation>
<xsd:element name="extension" type="j2ee:string" />
<xsd:element name="mime-type" type="j2ee:mime-typeType" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="mime-typeType">
- <xsd:annotation>
<xsd:documentation>The mime-typeType is used to indicate a defined mime type. Example: "text/plain" Used in: mime-mapping</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:pattern value="[^p{Cc}^s]+/[^p{Cc}^s]+" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="nonEmptyStringType">
- <xsd:annotation>
<xsd:documentation>This type defines a string which contains at least one character.</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:minLength value="1" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="security-constraintType">
- <xsd:annotation>
<xsd:documentation>The security-constraintType is used to associate security constraints with one or more web resource collections Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="display-name" type="j2ee:display-nameType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="web-resource-collection" type="j2ee:web-resource-collectionType" maxOccurs="unbounded" />
<xsd:element name="auth-constraint" type="j2ee:auth-constraintType" minOccurs="0" />
<xsd:element name="user-data-constraint" type="j2ee:user-data-constraintType" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="servlet-mappingType">
- <xsd:annotation>
<xsd:documentation>The servlet-mappingType defines a mapping between a servlet and a url pattern. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="servlet-name" type="j2ee:servlet-nameType" />
<xsd:element name="url-pattern" type="j2ee:url-patternType" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="servlet-nameType">
- <xsd:annotation>
<xsd:documentation>The servlet-name element contains the canonical name of the servlet. Each servlet name is unique within the web application.</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
<xsd:extension base="j2ee:nonEmptyStringType" />
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="servletType">
- <xsd:annotation>
<xsd:documentation>The servletType is used to declare a servlet. It contains the declarative data of a servlet. If a jsp-file is specified and the load-on-startup element is present, then the JSP should be precompiled and loaded. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:group ref="j2ee:descriptionGroup" />
<xsd:element name="servlet-name" type="j2ee:servlet-nameType" />
- <xsd:choice>
- <xsd:element name="servlet-class" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
<xsd:documentation>The servlet-class element contains the fully qualified class name of the servlet.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="jsp-file" type="j2ee:jsp-fileType" />
</xsd:choice>
<xsd:element name="init-param" type="j2ee:param-valueType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="load-on-startup" type="j2ee:xsdIntegerType" minOccurs="0">
- <xsd:annotation>
<xsd:documentation>The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. If the value is a positive integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="run-as" type="j2ee:run-asType" minOccurs="0" />
<xsd:element name="security-role-ref" type="j2ee:security-role-refType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="session-configType">
- <xsd:annotation>
<xsd:documentation>The session-configType defines the session parameters for this web application. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:element name="session-timeout" type="j2ee:xsdIntegerType" minOccurs="0">
- <xsd:annotation>
<xsd:documentation>The session-timeout element defines the default session timeout interval for all sessions created in this web application. The specified timeout must be expressed in a whole number of minutes. If the timeout is 0 or less, the container ensures the default behaviour of sessions is never to time out. If this element is not specified, the container must set its default timeout period.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="transport-guaranteeType">
- <xsd:annotation>
<xsd:documentation>The transport-guaranteeType specifies that the communication between client and server should be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the application does not require any transport guarantees. A value of INTEGRAL means that the application requires that the data sent between the client and server be sent in such a way that it can't be changed in transit. CONFIDENTIAL means that the application requires that the data be transmitted in a fashion that prevents other entities from observing the contents of the transmission. In most cases, the presence of the INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is required. Used in: user-data-constraint</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:enumeration value="NONE" />
<xsd:enumeration value="INTEGRAL" />
<xsd:enumeration value="CONFIDENTIAL" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="user-data-constraintType">
- <xsd:annotation>
<xsd:documentation>The user-data-constraintType is used to indicate how data communicated between the client and container should be protected. Used in: security-constraint</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
<xsd:element name="description" type="j2ee:descriptionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="transport-guarantee" type="j2ee:transport-guaranteeType" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="war-pathType">
- <xsd:annotation>
<xsd:documentation>The elements that use this type designate a path starting with a "/" and interpreted relative to the root of a WAR file.</xsd:documentation>
</xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
<xsd:pattern value="/.*" />
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:simpleType name="web-app-versionType">
- <xsd:annotation>
<xsd:documentation>This type contains the recognized versions of web-application supported. It is used to designate the version of the web application.</xsd:documentation>
</xsd:annotation>
- <xsd:restriction base="xsd:token">
<xsd:enumeration value="2.4" />
</xsd:restriction>
</xsd:simpleType>
- <!-- ****************************************************
-->
- <xsd:complexType name="web-appType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:group ref="j2ee:descriptionGroup" />
<xsd:element name="distributable" type="j2ee:emptyType" />
- <xsd:element name="context-param" type="j2ee:param-valueType">
- <xsd:annotation>
<xsd:documentation>The context-param element contains the declaration of a web application's servlet context initialization parameters.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="filter" type="j2ee:filterType" />
<xsd:element name="filter-mapping" type="j2ee:filter-mappingType" />
<xsd:element name="listener" type="j2ee:listenerType" />
<xsd:element name="servlet" type="j2ee:servletType" />
<xsd:element name="servlet-mapping" type="j2ee:servlet-mappingType" />
<xsd:element name="session-config" type="j2ee:session-configType" />
<xsd:element name="mime-mapping" type="j2ee:mime-mappingType" />
<xsd:element name="welcome-file-list" type="j2ee:welcome-file-listType" />
<xsd:element name="error-page" type="j2ee:error-pageType" />
<xsd:element name="jsp-config" type="j2ee:jsp-configType" />
<xsd:element name="security-constraint" type="j2ee:security-constraintType" />
<xsd:element name="login-config" type="j2ee:login-configType" />
<xsd:element name="security-role" type="j2ee:security-roleType" />
<xsd:group ref="j2ee:jndiEnvironmentRefsGroup" />
<xsd:element name="message-destination" type="j2ee:message-destinationType" />
<xsd:element name="locale-encoding-mapping-list" type="j2ee:locale-encoding-mapping-listType" />
</xsd:choice>
<xsd:attribute name="version" type="j2ee:web-app-versionType" use="required" />
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="web-resource-collectionType">
- <xsd:annotation>
<xsd:documentation>The web-resource-collectionType is used to identify a subset of the resources and HTTP methods on those resources within a web application to which a security constraint applies. If no HTTP methods are specified, then the security constraint applies to all HTTP methods. Used in: security-constraint</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:element name="web-resource-name" type="j2ee:string">
- <xsd:annotation>
<xsd:documentation>The web-resource-name contains the name of this web resource collection.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="description" type="j2ee:descriptionType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="url-pattern" type="j2ee:url-patternType" maxOccurs="unbounded" />
<xsd:element name="http-method" type="j2ee:http-methodType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
- <!-- ****************************************************
-->
- <xsd:complexType name="welcome-file-listType">
- <xsd:annotation>
<xsd:documentation>The welcome-file-list contains an ordered list of welcome files elements. Used in: web-app</xsd:documentation>
</xsd:annotation>
- <xsd:sequence>
- <xsd:element name="welcome-file" type="xsd:string" maxOccurs="unbounded">
- <xsd:annotation>
<xsd:documentation>The welcome-file element contains file name to use as a default welcome file, such as index.html</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
</xsd:schema>
struts-config_1_2.dtd
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
DTD for the Struts Application Configuration File
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.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
$Id$
-->
<!-- ========== 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 (display-name?, description?, 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; #REQUIRED>
<!-- 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"]
name The unique identifier for this form bean. Referenced by the
<action> element to specify which form bean to use with its
request.
type Fully qualified Java class name of the ActionForm subclass
to use with this form bean.
-->
<!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.
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"]
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 ""
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.
-->
<!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]
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.
scope The context ("request" or "session") that is used to access
the ActionError object [org.apache.struts.action.ActionError]
for this exception.
type Fully qualified Java class name of the exception type to
register with this handler.
-->
<!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"]
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.
DEPRECATED.
[false]
module The module prefix to use with this path. This value should
begin with a slash ("/").
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.
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]
-->
<!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 module %RequestPath; #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.
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"]
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.
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.
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.
name Name of the form bean, if any, that is associated with this
action mapping.
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.
prefix Prefix used to match request parameter names to ActionForm
property names, if any. Optional if "name" is specified,
else not allowed.
roles Comma-delimited list of security role names that are allowed
access to this ActionMapping object. Since Struts 1.1.
scope The context ("request" or "session") that is used to
access our ActionForm bean, if any. Optional if "name" is
specified, else not valid. [session]
suffix Suffix used to match request parameter names to ActionForm
bean property names, if any. Optional if "name" is
specified, else not valid.
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.
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]
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]
-->
<!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. 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"]
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"]
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"]
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]
locale Set to "true" if you want a Locale object stored in the
user's session if not already present.
[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"]
nocache Set to "true" if you want the controller to add HTTP
headers for defeating caching to every response from
this module. [false]
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"]
processorClass The fully qualified Java class name of the
RequestProcessor subclass to be used with this module.
["org.apache.struts.action.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 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"]
factory Fully qualified Java class name of the
MessageResourcesFactory subclass to use for this message
resources object.
["org.apache.struts.util.PropertyMessageResourcesFactory"]
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]
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.
-->
<!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].
-->
<!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>
hibernate-configuration-3.0.dtd
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
An instance of this document contains property settings and references
to mapping files for a number of SessionFactory instances to be listed
in JNDI.
-->
<!ELEMENT hibernate-configuration (session-factory,security?)>
<!ELEMENT property (#PCDATA)>
<!ATTLIST property name CDATA #REQUIRED>
<!ELEMENT mapping EMPTY> <!-- reference to a mapping file -->
<!ATTLIST mapping resource CDATA #IMPLIED>
<!ATTLIST mapping file CDATA #IMPLIED>
<!ATTLIST mapping jar CDATA #IMPLIED>
<!ATTLIST mapping package CDATA #IMPLIED>
<!ATTLIST mapping class CDATA #IMPLIED>
<!ELEMENT class-cache EMPTY>
<!ATTLIST class-cache class CDATA #REQUIRED>
<!ATTLIST class-cache region CDATA #IMPLIED>
<!ATTLIST class-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
<!ATTLIST class-cache include (all|non-lazy) "all">
<!ELEMENT collection-cache EMPTY>
<!ATTLIST collection-cache collection CDATA #REQUIRED>
<!ATTLIST collection-cache region CDATA #IMPLIED>
<!ATTLIST collection-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
<!ELEMENT event (listener*)>
<!ATTLIST event type (auto-flush|merge|create|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|post-load|post-update|post-insert|post-delete|post-commit-update|post-commit-insert|post-commit-delete) #REQUIRED>
<!ELEMENT listener EMPTY>
<!ATTLIST listener type (auto-flush|merge|create|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|post-load|post-update|post-insert|post-delete|post-commit-update|post-commit-insert|post-commit-delete) #IMPLIED>
<!ATTLIST listener class CDATA #REQUIRED>
<!ELEMENT session-factory (property*, mapping*, (class-cache|collection-cache)*, event*, listener*)>
<!ATTLIST session-factory name CDATA #IMPLIED> <!-- the JNDI name -->
<!ELEMENT security (grant*)>
<!ATTLIST security context CDATA #REQUIRED> <!--the JACC contextID-->
<!ELEMENT grant EMPTY>
<!ATTLIST grant role CDATA #REQUIRED>
<!ATTLIST grant entity-name CDATA #REQUIRED>
<!ATTLIST grant actions CDATA #REQUIRED>
ehcache.xml
<!-- Sets the path to the directory where cache .data files are created.
If the path is a Java System Property it is replaced by
its value in the running VM.
The following properties are translated:
user.home - User's home directory
user.dir - User's current working directory
java.io.tmpdir - Default temp file path -->
<diskStore path="java.io.tmpdir"/>
<!--Default Cache configuration. These will applied to caches programmatically created through
the CacheManager.
The following attributes are required for defaultCache:
maxInMemory - Sets the maximum number of objects that will be created in memory
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
is never expired.
timeToIdleSeconds - Sets the time to idle for an element before it expires.
i.e. The maximum amount of time between accesses before an element expires
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that an Element can idle for infinity
timeToLiveSeconds - Sets the time to live for an element before it expires.
i.e. The maximum time between creation time and when an element expires.
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that and Element can live for infinity
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
has reached the maxInMemory limit.
-->
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="1800"
timeToLiveSeconds="3600"
overflowToDisk="false"
/>
<cache name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="10000"
eternal="true"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<cache name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="1800"
timeToLiveSeconds="3600"
overflowToDisk="false"
/>
<!--Predefined caches. Add your cache configuration settings here.
If you do not have a configuration for your cache a WARNING will be issued when the
CacheManager starts
The following attributes are required for defaultCache:
name - Sets the name of the cache. This is used to identify the cache. It must be unique.
maxInMemory - Sets the maximum number of objects that will be created in memory
eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
is never expired.
timeToIdleSeconds - Sets the time to idle for an element before it expires.
i.e. The maximum amount of time between accesses before an element expires
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that an Element can idle for infinity
timeToLiveSeconds - Sets the time to live for an element before it expires.
i.e. The maximum time between creation time and when an element expires.
Is only used if the element is not eternal.
Optional attribute. A value of 0 means that an Element can live for infinity
overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
has reached the maxInMemory limit.
-->
<!-- Sample cache named sampleCache1
This cache contains a maximum in memory of 10000 elements, and will expire
an element if it is idle for more than 5 minutes and lives for more than
10 minutes.
If there are more than 10000 elements it will overflow to the
disk cache, which in this configuration will go to wherever java.io.tmp is
defined on your system. On a standard Linux system this will be /tmp"
-->
<!--cache name="my.package.Class"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
overflowToDisk="true"
/-->
<!-- Sample cache named sampleCache2
This cache contains 1000 elements. Elements will always be held in memory.
They are not expired. -->
<!--cache name="my.package.Class.collection"
maxElementsInMemory="1000"
eternal="true"
overflowToDisk="false"
/-->
<!-- Place configuration for your caches following -->
</ehcache>
validator_1_1_3.dtd
DTD for the Validator Rules Configuration File, Version 1.1.3
To allow for XML validation of your rules configuration
file, include the following DOCTYPE element at the beginning (after
the "xml" declaration):
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
$Id: validator_1_1_3.dtd,v 1.1.2.2 2004/04/06 22:20:36 rleland Exp $
-->
<!--
The "form-validation" element is the root of the configuration file
hierarchy, and contains nested elements for all of the other
configuration settings.
-->
<!ELEMENT form-validation (global*, formset*)>
<!--
The elements defined here are all global and must be nested within a
"global" element.
-->
<!ELEMENT global (validator*, constant*)>
<!--
The "validator" element defines what validator objects can be used with
the fields referenced by the formset elements.
elements:
validator Defines a new validatior
javascript The javascript source code for client side validation.
attributes:
name The name of this validation
classname The java class name that handles server side validation
method The java method that handles server side validation
methodParams The java class types passed to the serverside method
msg a generic message key to use when this validator fails.
It can be overridden by the 'msg' element for a specific field.
depends The comma-delimited list of validator that are called before this validator.
For this validation to succeed, all the listed validators must succeed.
jsFunctionName The name of the javascript function which returns all fields of a certain type.
jsFunction The name of the javascript function which is passed the form for validation.
-->
<!ELEMENT validator (javascript?)>
<!ATTLIST validator name CDATA #REQUIRED>
<!ATTLIST validator classname CDATA #REQUIRED>
<!ATTLIST validator method CDATA #REQUIRED>
<!ATTLIST validator methodParams CDATA #REQUIRED>
<!ATTLIST validator msg CDATA #REQUIRED>
<!ATTLIST validator depends CDATA #IMPLIED>
<!ATTLIST validator jsFunctionName CDATA #IMPLIED>
<!ATTLIST validator jsFunction CDATA #IMPLIED>
<!--
The "javascript" element defines a JavaScript that can be used to perform
client-side validators.
-->
<!ELEMENT javascript (#PCDATA)>
<!--
The "constant" element defines a static value that can be used as
replacement parameters within "field" elements. The "constant-name" and
"constant-value" elements define the constant's reference id and replacement
value.
-->
<!ELEMENT constant (constant-name, constant-value)>
<!ELEMENT constant-name (#PCDATA)>
<!ELEMENT constant-value (#PCDATA)>
<!--
The "formset" element defines a set of forms for a locale. Formsets for
specific locales can override only those fields that change. The
localization is properly scoped, so that a formset can override just the
language, or just the country, or both.
-->
<!ELEMENT formset (constant*, form+)>
<!ATTLIST formset language CDATA #IMPLIED>
<!ATTLIST formset country CDATA #IMPLIED>
<!ATTLIST formset variant CDATA #IMPLIED>
<!--
The "form" element defines a set of fields to be validated. The name
corresponds to the identifier the application assigns to the form.
-->
<!ELEMENT form (field+)>
<!ATTLIST form name CDATA #REQUIRED>
<!--
The "field" element defines the properties to be validated. In a
web application, a field would also correspond to a control on
a HTML form. To validate the properties, the validator works through
a JavaBean representation. The field element accepts these
attributes:
property The property on the JavaBean corresponding to this
field element.
depends The comma-delimited list of validators to apply against
this field. For the field to succeed, all the
validators must succeed.
page The JavaBean corresponding to this form may include
a page property. Only fields with a "page" attribute
value that is equal to or less than the page property
on the form JavaBean are processed. This is useful when
using a "wizard" approach to completing a large form,
to ensure that a page is not skipped.
[0]
indexedListProperty
The "indexedListProperty" is the method name that will
return an array or a Collection used to retrieve the
list and then loop through the list performing the
validations for this field.
-->
<!ELEMENT field (msg|arg|arg0|arg1|arg2|arg3|var)*>
<!ATTLIST field property CDATA #REQUIRED>
<!ATTLIST field depends CDATA #IMPLIED>
<!ATTLIST field page CDATA #IMPLIED>
<!ATTLIST field indexedListProperty CDATA #IMPLIED>
<!--
The "msg" element defines a custom message key to use when one of the
validators for this field fails. Each validator has a default message
property that is used when a corresponding field msg is not specified.
Each validator applied to a field may have its own msg element.
The msg element accepts these attributes.
name The name of the validator corresponding to this msg.
bundle The resource bundle name that the key should be resolved in.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
-->
<!ELEMENT msg EMPTY>
<!ATTLIST msg key CDATA #REQUIRED>
<!ATTLIST msg name CDATA #REQUIRED>
<!ATTLIST msg bundle CDATA #IMPLIED>
<!ATTLIST msg resource CDATA #IMPLIED>
<!--
The "arg" element defines a replacement value to use with the
message template for this validator or this field.
The arg element accepts these attributes.
name The name of the validator corresponding to this msg.
If not supplied, this argument will be used in the given
position for every validator.
bundle The resource bundle name that the key should be resolved in.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
position The position of this replacement parameter in the message.
For example, position="0" will set the first argument.
[0]
-->
<!ELEMENT arg EMPTY>
<!ATTLIST arg key CDATA #REQUIRED>
<!ATTLIST arg bundle CDATA #IMPLIED>
<!ATTLIST arg name CDATA #IMPLIED>
<!ATTLIST arg resource CDATA #IMPLIED>
<!ATTLIST arg position CDATA #IMPLIED>
<!--
DEPRECATED Use <arg position="0"/> instead.
The "arg0" element defines the first replacement value to use with the
message template for this validator or this field.
The arg0 element accepts these attributes.
name The name of the validator corresponding to this msg.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
-->
<!ELEMENT arg0 EMPTY>
<!ATTLIST arg0 name CDATA #IMPLIED>
<!ATTLIST arg0 key CDATA #IMPLIED>
<!ATTLIST arg0 resource CDATA #IMPLIED>
<!--
DEPRECATED Use <arg position="1"/> instead.
The "arg1" element defines the second replacement value to use with the
message template for this validator or this field.
The arg1 element accepts these attributes.
name The name of the validator corresponding to this msg.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
-->
<!ELEMENT arg1 EMPTY>
<!ATTLIST arg1 name CDATA #IMPLIED>
<!ATTLIST arg1 key CDATA #IMPLIED>
<!ATTLIST arg1 resource CDATA #IMPLIED>
<!--
DEPRECATED Use <arg position="2"/> instead.
The "arg2" element defines the third replacement value to use with the
message template for this validator or this field.
The arg2 element accepts these attributes.
name The name of the validator corresponding to this msg.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
-->
<!ELEMENT arg2 EMPTY>
<!ATTLIST arg2 name CDATA #IMPLIED>
<!ATTLIST arg2 key CDATA #IMPLIED>
<!ATTLIST arg2 resource CDATA #IMPLIED>
<!--
DEPRECATED Use <arg position="3"/> instead.
The "arg3" element defines the fourth replacement value to use with the
message template for this validator or this field.
The arg0 element accepts these attributes.
name The name of the validator corresponding to this msg.
key The key that will return the message template from a
resource bundle.
resource If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
-->
<!ELEMENT arg3 EMPTY>
<!ATTLIST arg3 name CDATA #IMPLIED>
<!ATTLIST arg3 key CDATA #IMPLIED>
<!ATTLIST arg3 resource CDATA #IMPLIED>
<!--
The "var" element can set parameters that a field may need to pass to
one of its validators, such as the minimum and maximum values in a
range validation. These parameters may also be referenced by one of the
arg? elements using a shell syntax: ${var:var-name}.
-->
<!ELEMENT var (var-name, var-value, var-jstype?)>
<!--
The name of the var parameter to provide to a field's validators.
-->
<!ELEMENT var-name (#PCDATA)>
<!--
The value of the var parameter to provide to a field's validators.
-->
<!ELEMENT var-value (#PCDATA)>
<!--
The java script type, Possible Values [int| string | regexp]
-->
<!ELEMENT var-jstype (#PCDATA)>
commons-logging.properties
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
log4j.properties
log4j.rootLogger=info,CONSOLE,A1, FILE, ROLLING_FILE, MAIL, DATABASE, html
log4j.addivity.org.apache=true
# 应用于控制台
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.Threshold=DEBUG
log4j.appender.CONSOLE.Target=System.out
log4j.appender.CONSOLE.Encoding=GBK
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n
#log4j.appender.CONSOLE.layout.ConversionPattern=[start]%d{DATE}[DATE]%n%p[PRIORITY]%n%x[NDC]%n%t[THREAD] n%c[CATEGORY]%n%m[MESSAGE]%n%n
#应用于文件
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=e://file.log
log4j.appender.FILE.Append=false
log4j.appender.FILE.Encoding=GBK
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n
# Use this layout for LogFactor 5 analysis
# 应用于文件回滚
log4j.appender.ROLLING_FILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLING_FILE.Threshold=ERROR
log4j.appender.ROLLING_FILE.File=e://rolling.log
log4j.appender.ROLLING_FILE.Append=true
log4j.appender.CONSOLE_FILE.Encoding=GBK
log4j.appender.ROLLING_FILE.MaxFileSize=10KB
log4j.appender.ROLLING_FILE.MaxBackupIndex=1
log4j.appender.ROLLING_FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLING_FILE.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n
#应用于socket
log4j.appender.SOCKET=org.apache.log4j.RollingFileAppender
log4j.appender.SOCKET.RemoteHost=localhost
log4j.appender.SOCKET.Port=5001
log4j.appender.SOCKET.LocationInfo=true
# Set up for Log Facter 5
log4j.appender.SOCKET.layout=org.apache.log4j.PatternLayout
log4j.appender.SOCET.layout.ConversionPattern=[start]%d{DATE}[DATE]%n%p[PRIORITY]%n%x[NDC]%n%t[THREAD]%n%c[CATEGORY]%n%m[MESSAGE]%n%n
# Log Factor 5 Appender
log4j.appender.LF5_APPENDER=org.apache.log4j.lf5.LF5Appender
log4j.appender.LF5_APPENDER.MaxNumberOfRecords=2000
# 发送日志给邮件
log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender
log4j.appender.MAIL.Threshold=FATAL
log4j.appender.MAIL.BufferSize=10
log4j.appender.MAIL.From=yishengyouni_bao@163.com
log4j.appender.MAIL.SMTPHost=smtp.163.com
log4j.appender.MAIL.Subject=Log4J Message
log4j.appender.MAIL.To=zhangjianbao017@163.com
log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.MAIL.layout.ConversionPattern=[framework] %d - %c -%-4r [%t] %-5p %c %x - %m%n
# 用于数据库
log4j.appender.DATABASE=org.apache.log4j.jdbc.JDBCAppender
#log4j.appender.DATABASE.BufferSize = 10
log4j.appender.DATABASE.URL=jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=sooyie_news;
log4j.appender.DATABASE.driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
log4j.appender.DATABASE.user=sa
log4j.appender.DATABASE.password=
log4j.appender.DATABASE.sql=INSERT INTO logInfo (createDate, priority, category, message) VALUES ('%d{ISO8601}', '%-5p', '%C,%L', '%m')
log4j.appender.DATABASE.layout=org.apache.log4j.PatternLayout
# 每天新建日志
log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=e://log.log
log4j.appender.A1.Encoding=GBK
log4j.appender.A1.DatePattern='.'yyyy-MM-dd
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L : %m%n
log4j.appender.html=org.apache.log4j.DailyRollingFileAppender
log4j.appender.html.layout=org.apache.log4j.HTMLLayout
log4j.appender.html.File=e://log.html
log4j.appender.html.DatePattern='.'yyyy-MM-dd-HH'.html'
- J2EE开发常用
- J2EE开发常用数据库连接池
- J2EE开发常用框架介绍
- j2ee开发常用开发工具网址集
- J2EE开发常用开源项目名词解释
- J2EE 项目开发常用jar包
- J2EE开发常用架构及其性能
- J2EE开发常用开源框架技术
- j2ee web开发常用模板 选择
- 【J2EE核心开发学习笔记 011】Struts2常用开发技能
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍(转)
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍
- J2EE开发之常用开源项目介绍
- matlab for linux 快捷键设置
- 月入8千的出租司机给我上上的一堂MBA
- 关于"RPC server is unavailable"的解决方案
- 浅谈C++类(6)--复制构造函数
- ...
- J2EE开发常用
- Java中容易出现乱码的地方以及解决方法
- 怎样用javascript来改变链接中的文字的颜色和字体!!
- java中日期、日期格式、日期的解析和日期的计算
- Xlib Development Packages on Ubuntu Feisty
- 近10年最强得计算机图书你看过几本?
- WindowsXP系统自带的两个无敌命令
- 关于《程序员杂志》的“刊网互动”的一些看法
- 反思当前的中小学的计算机教育