📄 web-app_2_3.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.--><!--This is the XML DTD for the Servlet 2.3 deployment descriptor.All Servlet 2.3 deployment descriptors must include a DOCTYPEof the following form: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">--><!--The following conventions apply to all J2EE deployment descriptorelements unless indicated otherwise.- In elements that contain PCDATA, leading and trailing whitespace in the data may be ignored.- In elements whose value is an "enumerated type", the value is case sensitive.- 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.--><!--The web-app element is the root of the deployment descriptor fora web application.--><!ELEMENT web-app (icon?, display-name?, description?, distributable?,context-param*, filter*, filter-mapping*, listener*, servlet*,servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*)><!--The auth-constraint element indicates the user roles that shouldbe permitted access to this resource collection. The role-nameused here must either correspond to the role-name of one of thesecurity-role elements defined for this web application, or bethe specially reserved role-name "*" that is a compact syntax forindicating all roles in the web application. If both "*" androlenames appear, the container interprets this as all roles.If no roles are defined, no user is allowed access to the portion ofthe web application described by the containing security-constraint.The container matches role names case sensitively when determiningaccess.Used in: security-constraint--><!ELEMENT auth-constraint (description?, role-name*)><!--The auth-method element is used to configure the authenticationmechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorizationconstraint, a user must have authenticated using the configuredmechanism. Legal values for this element are "BASIC", "DIGEST","FORM", or "CLIENT-CERT".Used in: login-config--><!ELEMENT auth-method (#PCDATA)><!--The context-param element contains the declaration of a webapplication's servlet context initialization parameters.Used in: web-app--><!ELEMENT context-param (param-name, param-value, description?)><!--The description element is used to provide text describing the parentelement. The description element should include any information thatthe web application war file producer wants to provide to the consumer ofthe web application war file (i.e., to the Deployer). Typically, the toolsused by the web application war file consumer will display the descriptionwhen processing the parent element that contains the description.Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,security-role, security-role-ref, servlet, user-data-constraint,web-app, web-resource-collection--><!ELEMENT description (#PCDATA)><!--The display-name element contains a short name that is intended to bedisplayed by tools. The display name need not be unique.Used in: filter, security-constraint, servlet, web-appExample:<display-name>Employee Self Service</display-name>--><!ELEMENT display-name (#PCDATA)><!--The distributable element, by its presence in a web applicationdeployment descriptor, indicates that this web application isprogrammed appropriately to be deployed into a distributed servletcontainerUsed in: web-app--><!ELEMENT distributable EMPTY><!--The ejb-link element is used in the ejb-ref or ejb-local-refelements to specify that an EJB reference is linked to anenterprise bean.The name in the ejb-link element is composed of apath name specifying the ejb-jar containing the referenced enterprisebean with the ejb-name of the target bean appended and separated fromthe path name by "#". The path name is relative to the war filecontaining the web application that is referencing the enterprise bean.This allows multiple enterprise beans with the same ejb-name to beuniquely identified.Used in: ejb-local-ref, ejb-refExamples: <ejb-link>EmployeeRecord</ejb-link> <ejb-link>../products/product.jar#ProductEJB</ejb-link>--><!ELEMENT ejb-link (#PCDATA)><!--The ejb-local-ref element is used for the declaration of a reference toan enterprise bean's local home. The declaration consists of: - an optional description - the EJB reference name used in the code of the web application that's referencing the enterprise bean - the expected type of the referenced enterprise bean - the expected local home and local interfaces of the referenced enterprise bean - optional ejb-link information, used to specify the referenced enterprise beanUsed in: web-app--><!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type, local-home, local, ejb-link?)><!--The ejb-ref element is used for the declaration of a reference toan enterprise bean's home. The declaration consists of: - an optional description - the EJB reference name used in the code of the web application that's referencing the enterprise bean - the expected type of the referenced enterprise bean - the expected home and remote interfaces of the referenced enterprise bean - optional ejb-link information, used to specify the referenced enterprise beanUsed in: web-app--><!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home, remote, ejb-link?)><!--The ejb-ref-name element contains the name of an EJB reference. TheEJB reference is an entry in the web application's environment and isrelative to the java:comp/env context. The name must be uniquewithin the web application.It is recommended that name is prefixed with "ejb/".Used in: ejb-local-ref, ejb-refExample:<ejb-ref-name>ejb/Payroll</ejb-ref-name>--><!ELEMENT ejb-ref-name (#PCDATA)><!--The ejb-ref-type element contains the expected type of thereferenced enterprise bean.The ejb-ref-type element must be one of the following: <ejb-ref-type>Entity</ejb-ref-type> <ejb-ref-type>Session</ejb-ref-type>Used in: ejb-local-ref, ejb-ref--><!ELEMENT ejb-ref-type (#PCDATA)><!--The env-entry element contains the declaration of a web application'senvironment entry. The declaration consists of an optionaldescription, the name of the environment entry, and an optionalvalue. If a value is not specified, one must be suppliedduring deployment.--><!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,env-entry-type)><!--The env-entry-name element contains the name of a web applications'senvironment entry. The name is a JNDI name relative to thejava:comp/env context. The name must be unique within a web application.Example:<env-entry-name>minAmount</env-entry-name>Used in: env-entry--><!ELEMENT env-entry-name (#PCDATA)><!--The env-entry-type element contains the fully-qualified Java type ofthe environment entry value that is expected by the web application'scode.The following are the legal values of env-entry-type: java.lang.Boolean java.lang.Byte java.lang.Character java.lang.String java.lang.Short java.lang.Integer java.lang.Long java.lang.Float java.lang.DoubleUsed in: env-entry--><!ELEMENT env-entry-type (#PCDATA)><!--The env-entry-value element contains the value of a web application'senvironment entry. The value must be a String that is valid for theconstructor of the specified type that takes a single Stringparameter, or for java.lang.Character, a single character.Example:<env-entry-value>100.00</env-entry-value>Used in: env-entry--><!ELEMENT env-entry-value (#PCDATA)><!--The error-code contains an HTTP error code, ex: 404Used in: error-page--><!ELEMENT error-code (#PCDATA)><!--The error-page element contains a mapping between an error codeor exception type to the path of a resource in the web applicationUsed in: web-app--><!ELEMENT error-page ((error-code | exception-type), location)><!--The exception type contains a fully qualified class name of aJava exception type.Used in: error-page--><!ELEMENT exception-type (#PCDATA)><!--The extension element contains a string describing anextension. example: "txt"Used in: mime-mapping--><!ELEMENT extension (#PCDATA)><!--Declares a filter in the web application. The filter is mapped toeither a servlet or a URL pattern in the filter-mapping element, usingthe filter-name value to reference. Filters can access theinitialization parameters declared in the deployment descriptor atruntime via the FilterConfig interface.Used in: web-app--><!ELEMENT filter (icon?, filter-name, display-name?, description?,filter-class, init-param*)><!--The fully qualified classname of the filter.Used in: filter--><!ELEMENT filter-class (#PCDATA)><!--Declaration of the filter mappings in this web application. Thecontainer uses the filter-mapping declarations to decide which filtersto apply to a request, and in what order. The container matches therequest URI to a Servlet in the normal way. To determine which filtersto apply it matches filter-mapping declarations either on servlet-name,or on url-pattern for each filter-mapping element, depending on whichstyle is used. The order in which filters are invoked is the order inwhich filter-mapping declarations that match a request URI for aservlet appear in the list of filter-mapping elements.The filter-namevalue must be the value of the <filter-name> sub-elements of one of the<filter> declarations in the deployment descriptor.Used in: web-app--><!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))><!--The logical name of the filter. This name is used to map the filter.Each filter name is unique within the web application.Used in: filter, filter-mapping--><!ELEMENT filter-name (#PCDATA)><!--The form-error-page element defines the location in the web appwhere the error page that is displayed when login is not successfulcan be found. The path begins with a leading / and is interpretedrelative to the root of the WAR.Used in: form-login-config--><!ELEMENT form-error-page (#PCDATA)><!--The form-login-config element specifies the login and error pagesthat should be used in form based login. If form based authenticationis not used, these elements are ignored.Used in: login-config--><!ELEMENT form-login-config (form-login-page, form-error-page)><!--The form-login-page element defines the location in the web appwhere the page that can be used for login can be found. The pathbegins with a leading / and is interpreted relative to the root of the WAR.Used in: form-login-config--><!ELEMENT form-login-page (#PCDATA)><!--The home element contains the fully-qualified name of the enterprisebean's home interface.Used in: ejb-refExample:<home>com.aardvark.payroll.PayrollHome</home>--><!ELEMENT home (#PCDATA)><!--The http-method contains an HTTP method (GET | POST |...).Used in: web-resource-collection--><!ELEMENT http-method (#PCDATA)><!--The icon element contains small-icon and large-icon elements thatspecify the file names for small and a large GIF or JPEG icon imagesused to represent the parent element in a GUI tool.Used in: filter, servlet, web-app--><!ELEMENT icon (small-icon?, large-icon?)><!--The init-param element contains a name/value pair as aninitialization param of the servletUsed in: filter, servlet--><!ELEMENT init-param (param-name, param-value, description?)><!--The jsp-file element contains the full path to a JSP file withinthe web application beginning with a `/'.Used in: servlet--><!ELEMENT jsp-file (#PCDATA)><!--The large-icon element contains the name of a filecontaining a large (32 x 32) icon image. The filename is a relative path within the web application'swar file.The image may be either in the JPEG or GIF format.The icon can be used by tools.Used in: iconExample:<large-icon>employee-service-icon32x32.jpg</large-icon>--><!ELEMENT large-icon (#PCDATA)><!--The listener element indicates the deployment properties for a webapplication listener bean.Used in: web-app--><!ELEMENT listener (listener-class)><!--The listener-class element declares a class in the application must beregistered as a web application listener bean. The value is the fully qualified classname of the listener class.Used in: listener--><!ELEMENT listener-class (#PCDATA)><!--The load-on-startup element indicates that this servlet should beloaded (instantiated and have its init() called) on the startupof the web application. The optional contents ofthese element must be an integer indicating the order in whichthe servlet should be loaded. If the value is a negative integer,or the element is not present, the container is free to load theservlet whenever it chooses. If the value is a positive integeror 0, the container must load and initialize the servlet as theapplication is deployed. The container must guarantee thatservlets marked with lower integers are loaded before servletsmarked with higher integers. The container may choose the orderof loading of servlets with the same load-on-start-up value.Used in: servlet--><!ELEMENT load-on-startup (#PCDATA)><!--The local element contains the fully-qualified name of theenterprise bean's local interface.Used in: ejb-local-ref--><!ELEMENT local (#PCDATA)><!--The local-home element contains the fully-qualified name of theenterprise bean's local home interface.Used in: ejb-local-ref--><!ELEMENT local-home (#PCDATA)><!--The location element contains the location of the resource in the webapplication relative to the root of the web application. The value ofthe location must have a leading `/'.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -