ASF Bugzilla – Attachment 30567 Details for
Bug 55166
schemaLocation references between servlet and jsp XSDs are invalid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch
55166-5.patch (text/plain), 143.68 KB, created by
Jeremy Boynes
on 2013-07-08 01:07:00 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Jeremy Boynes
Created:
2013-07-08 01:07:00 UTC
Size:
143.68 KB
patch
obsolete
>Index: java/javax/servlet/jsp/resources/jsp_2_0.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/jsp_2_0.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/jsp_2_0.xsd (working copy) >@@ -1,288 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!-- >- 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. >---> >-<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.0"> >- <xsd:annotation> >- <xsd:documentation> >- @(#)jsp_2_0.xsds 1.17 03/18/03 >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- This is the XML Schema for the JSP 2.0 deployment descriptor >- types. The JSP 2.0 schema contains all the special >- structures and datatypes that are necessary to use JSP files >- from a web application. >- >- The contents of this schema is used by the web-app_2_4.xsd >- file to define JSP specific content. >- >- </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:complexType name="jsp-configType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-configType is used to provide global configuration >- information for the JSP files in a web application. It has >- two subelements, taglib and jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:element name="taglib" >- type="j2ee:taglibType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="jsp-property-group" >- type="j2ee:jsp-property-groupType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-fileType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-file element contains the full path to a JSP file >- within the web application beginning with a `/'. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:simpleContent> >- <xsd:restriction base="j2ee:pathType"/> >- </xsd:simpleContent> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-property-groupType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-property-groupType is used to group a number of >- files so they can be given global property information. >- All files so described are deemed to be JSP files. The >- following additional properties can be described: >- >- - Control whether EL is ignored >- - Control whether scripting elements are invalid >- - Indicate pageEncoding information. >- - Indicate that a resource is a JSP document (XML) >- - Prelude and Coda automatic includes. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:group ref="j2ee:descriptionGroup"/> >- <xsd:element name="url-pattern" >- type="j2ee:url-patternType" >- maxOccurs="unbounded"/> >- <xsd:element name="el-ignored" >- type="j2ee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily set the isELIgnored >- property of a group of JSP pages. By default, the >- EL evaluation is enabled for Web Applications using >- a Servlet 2.4 or greater web.xml, and disabled >- otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="page-encoding" >- type="j2ee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of page-encoding are those of the >- pageEncoding page directive. It is a >- translation-time error to name different encodings >- in the pageEncoding attribute of the page directive >- of a JSP page and in a JSP configuration element >- matching the page. It is also a translation-time >- error to name different encodings in the prolog >- or text declaration of a document in XML syntax and >- in a JSP configuration element matching the document. >- It is legal to name the same encoding through >- mulitple mechanisms. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="scripting-invalid" >- type="j2ee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily disable scripting in a >- group of JSP pages. By default, scripting is >- enabled. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="is-xml" >- type="j2ee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- If true, denotes that the group of resources >- that match the URL pattern are JSP documents, >- and thus must be interpreted as XML documents. >- If false, the resources are assumed to not >- be JSP documents, unless there is another >- property group that indicates otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-prelude" >- type="j2ee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-prelude element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the beginning of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-coda" >- type="j2ee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-coda element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the end of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="taglibType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglibType defines the syntax for declaring in >- the deployment descriptor that a tag library is >- available to the application. This can be done >- to override implicit map entries from TLD files and >- from the container. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:element name="taglib-uri" >- type="j2ee:string"> >- <xsd:annotation> >- <xsd:documentation> >- >- A taglib-uri element describes a URI identifying a >- tag library used in the web application. The body >- of the taglib-uri element may be either an >- absolute URI specification, or a relative URI. >- There should be no entries in web.xml with the >- same taglib-uri value. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- >- <xsd:element name="taglib-location" >- type="j2ee:pathType"> >- <xsd:annotation> >- <xsd:documentation> >- >- the taglib-location element contains the location >- (as a resource relative to the root of the web >- application) where to find the Tag Library >- Description file for the tag library. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-</xsd:schema> >- >Index: java/javax/servlet/jsp/resources/jsp_2_1.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/jsp_2_1.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/jsp_2_1.xsd (working copy) >@@ -1,73 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >- >-<!-- >- 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. >---> >- >-<!-- >- ** The actual Sun XSD for this stripped down XSD can be found at >- ** http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd >- ** This XSD contains only the functional elements for programatic use. >---> >- >-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" >- targetNamespace="http://java.sun.com/xml/ns/javaee" >- xmlns:javaee="http://java.sun.com/xml/ns/javaee" >- xmlns:xsd="http://www.w3.org/2001/XMLSchema" >- elementFormDefault="qualified" >- attributeFormDefault="unqualified" >- version="2.1"> >- >- <xsd:include schemaLocation="javaee_5.xsd" /> >- >- <xsd:complexType name="jsp-configType"> >- <xsd:sequence> >- <xsd:element name="taglib" type="javaee:taglibType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="jsp-property-group" type="javaee:jsp-property-groupType" minOccurs="0" maxOccurs="unbounded" /> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="jsp-fileType"> >- <xsd:simpleContent> >- <xsd:restriction base="javaee:pathType" /> >- </xsd:simpleContent> >- </xsd:complexType> >- >- <xsd:complexType name="jsp-property-groupType"> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup"/> >- <xsd:element name="url-pattern" type="javaee:url-patternType" maxOccurs="unbounded" /> >- <xsd:element name="el-ignored" type="javaee:true-falseType" minOccurs="0" /> >- <xsd:element name="page-encoding" type="javaee:string" minOccurs="0" /> >- <xsd:element name="scripting-invalid" type="javaee:true-falseType" minOccurs="0" /> >- <xsd:element name="is-xml" type="javaee:true-falseType" minOccurs="0" /> >- <xsd:element name="include-prelude" type="javaee:pathType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="include-coda" type="javaee:pathType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="deferred-syntax-allowed-as-literal" type="javaee:true-falseType" minOccurs="0" /> >- <xsd:element name="trim-directive-whitespaces" type="javaee:true-falseType" minOccurs="0" /> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="taglibType"> >- <xsd:sequence> >- <xsd:element name="taglib-uri" type="javaee:string" /> >- <xsd:element name="taglib-location" type="javaee:pathType" /> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >-</xsd:schema> >\ No newline at end of file >Index: java/javax/servlet/jsp/resources/jsp_2_2.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/jsp_2_2.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/jsp_2_2.xsd (working copy) >@@ -1,406 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" >- targetNamespace="http://java.sun.com/xml/ns/javaee" >- xmlns:javaee="http://java.sun.com/xml/ns/javaee" >- xmlns:xsd="http://www.w3.org/2001/XMLSchema" >- elementFormDefault="qualified" >- attributeFormDefault="unqualified" >- version="2.2"> >- <xsd:annotation> >- <xsd:documentation> >- >- $Id$ >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. >- >- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. >- >- The contents of this file are subject to the terms of either the >- GNU General Public License Version 2 only ("GPL") or the Common >- Development and Distribution License("CDDL") (collectively, the >- "License"). You may not use this file except in compliance with >- the License. You can obtain a copy of the License at >- https://glassfish.dev.java.net/public/CDDL+GPL.html or >- glassfish/bootstrap/legal/LICENSE.txt. See the License for the >- specific language governing permissions and limitations under the >- License. >- >- When distributing the software, include this License Header >- Notice in each file and include the License file at >- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this >- particular file as subject to the "Classpath" exception as >- provided by Sun in the GPL Version 2 section of the License file >- that accompanied this code. If applicable, add the following >- below the License Header, with the fields enclosed by brackets [] >- replaced by your own identifying information: >- "Portions Copyrighted [year] [name of copyright owner]" >- >- Contributor(s): >- >- If you wish your version of this file to be governed by only the >- CDDL or only the GPL Version 2, indicate your decision by adding >- "[Contributor] elects to include this software in this >- distribution under the [CDDL or GPL Version 2] license." If you >- don't indicate a single choice of license, a recipient has the >- option to distribute your version of this file under either the >- CDDL, the GPL Version 2 or to extend the choice of license to its >- licensees as provided above. However, if you add GPL Version 2 >- code and therefore, elected the GPL Version 2 license, then the >- option applies only if the new code is made subject to such >- option by the copyright holder. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- The Apache Software Foundation elects to include this software under the >- CDDL license. >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- This is the XML Schema for the JSP 2.2 deployment descriptor >- types. The JSP 2.2 schema contains all the special >- structures and datatypes that are necessary to use JSP files >- from a web application. >- >- The contents of this schema is used by the web-common_3_0.xsd >- file to define JSP specific content. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- The following conventions apply to all Java EE >- 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="javaee_6.xsd"/> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-configType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-configType is used to provide global configuration >- information for the JSP files in a web application. It has >- two subelements, taglib and jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:element name="taglib" >- type="javaee:taglibType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="jsp-property-group" >- type="javaee:jsp-property-groupType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-fileType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-file element contains the full path to a JSP file >- within the web application beginning with a `/'. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:simpleContent> >- <xsd:restriction base="javaee:pathType"/> >- </xsd:simpleContent> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-property-groupType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-property-groupType is used to group a number of >- files so they can be given global property information. >- All files so described are deemed to be JSP files. The >- following additional properties can be described: >- >- - Control whether EL is ignored. >- - Control whether scripting elements are invalid. >- - Indicate pageEncoding information. >- - Indicate that a resource is a JSP document (XML). >- - Prelude and Coda automatic includes. >- - Control whether the character sequence #{ is allowed >- when used as a String literal. >- - Control whether template text containing only >- whitespaces must be removed from the response output. >- - Indicate the default contentType information. >- - Indicate the default buffering model for JspWriter >- - Control whether error should be raised for the use of >- undeclared namespaces in a JSP page. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup"/> >- <xsd:element name="url-pattern" >- type="javaee:url-patternType" >- maxOccurs="unbounded"/> >- <xsd:element name="el-ignored" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily set the isELIgnored >- property of a group of JSP pages. By default, the >- EL evaluation is enabled for Web Applications using >- a Servlet 2.4 or greater web.xml, and disabled >- otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="page-encoding" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of page-encoding are those of the >- pageEncoding page directive. It is a >- translation-time error to name different encodings >- in the pageEncoding attribute of the page directive >- of a JSP page and in a JSP configuration element >- matching the page. It is also a translation-time >- error to name different encodings in the prolog >- or text declaration of a document in XML syntax and >- in a JSP configuration element matching the document. >- It is legal to name the same encoding through >- mulitple mechanisms. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="scripting-invalid" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily disable scripting in a >- group of JSP pages. By default, scripting is >- enabled. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="is-xml" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- If true, denotes that the group of resources >- that match the URL pattern are JSP documents, >- and thus must be interpreted as XML documents. >- If false, the resources are assumed to not >- be JSP documents, unless there is another >- property group that indicates otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-prelude" >- type="javaee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-prelude element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the beginning of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-coda" >- type="javaee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-coda element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the end of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="deferred-syntax-allowed-as-literal" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The character sequence #{ is reserved for EL expressions. >- Consequently, a translation error occurs if the #{ >- character sequence is used as a String literal, unless >- this element is enabled (true). Disabled (false) by >- default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="trim-directive-whitespaces" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Indicates that template text containing only whitespaces >- must be removed from the response output. It has no >- effect on JSP documents (XML syntax). Disabled (false) >- by default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="default-content-type" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of default-content-type are those of the >- contentType page directive. It specifies the default >- response contentType if the page directive does not include >- a contentType attribute. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="buffer" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of buffer are those of the >- buffer page directive. It specifies if buffering should be >- used for the output to response, and if so, the size of the >- buffer to use. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="error-on-undeclared-namespace" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The default behavior when a tag with unknown namespace is used >- in a JSP page (regular syntax) is to silently ignore it. If >- set to true, then an error must be raised during the translation >- time when an undeclared tag is used in a JSP page. Disabled >- (false) by default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="taglibType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglibType defines the syntax for declaring in >- the deployment descriptor that a tag library is >- available to the application. This can be done >- to override implicit map entries from TLD files and >- from the container. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:element name="taglib-uri" >- type="javaee:string"> >- <xsd:annotation> >- <xsd:documentation> >- >- A taglib-uri element describes a URI identifying a >- tag library used in the web application. The body >- of the taglib-uri element may be either an >- absolute URI specification, or a relative URI. >- There should be no entries in web.xml with the >- same taglib-uri value. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="taglib-location" >- type="javaee:pathType"> >- <xsd:annotation> >- <xsd:documentation> >- >- the taglib-location element contains the location >- (as a resource relative to the root of the web >- application) where to find the Tag Library >- Description file for the tag library. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >-</xsd:schema> >- >- >Index: java/javax/servlet/jsp/resources/jsp_2_3.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/jsp_2_3.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/jsp_2_3.xsd (working copy) >@@ -1,396 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" >- targetNamespace="http://xmlns.jcp.org/xml/ns/javaee" >- xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee" >- xmlns:xsd="http://www.w3.org/2001/XMLSchema" >- elementFormDefault="qualified" >- attributeFormDefault="unqualified" >- version="2.3"> >- <xsd:annotation> >- <xsd:documentation> >- >- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. >- >- Copyright (c) 2009-2013 Oracle and/or its affiliates. All rights reserved. >- >- The contents of this file are subject to the terms of either the GNU >- General Public License Version 2 only ("GPL") or the Common Development >- and Distribution License("CDDL") (collectively, the "License"). You >- may not use this file except in compliance with the License. You can >- obtain a copy of the License at >- https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html >- or packager/legal/LICENSE.txt. See the License for the specific >- language governing permissions and limitations under the License. >- >- When distributing the software, include this License Header Notice in each >- file and include the License file at packager/legal/LICENSE.txt. >- >- GPL Classpath Exception: >- Oracle designates this particular file as subject to the "Classpath" >- exception as provided by Oracle in the GPL Version 2 section of the License >- file that accompanied this code. >- >- Modifications: >- If applicable, add the following below the License Header, with the fields >- enclosed by brackets [] replaced by your own identifying information: >- "Portions Copyright [year] [name of copyright owner]" >- >- Contributor(s): >- If you wish your version of this file to be governed by only the CDDL or >- only the GPL Version 2, indicate your decision by adding "[Contributor] >- elects to include this software in this distribution under the [CDDL or GPL >- Version 2] license." If you don't indicate a single choice of license, a >- recipient has the option to distribute your version of this file under >- either the CDDL, the GPL Version 2 or to extend the choice of license to >- its licensees as provided above. However, if you add GPL Version 2 code >- and therefore, elected the GPL Version 2 license, then the option applies >- only if the new code is made subject to such option by the copyright >- holder. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- The Apache Software Foundation elects to include this software under the >- CDDL license. >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- This is the XML Schema for the JSP 2.3 deployment descriptor >- types. The JSP 2.3 schema contains all the special >- structures and datatypes that are necessary to use JSP files >- from a web application. >- >- The contents of this schema is used by the web-common_3_1.xsd >- file to define JSP specific content. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:annotation> >- <xsd:documentation> >- >- The following conventions apply to all Java EE >- 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="javaee_7.xsd"/> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-configType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-configType is used to provide global configuration >- information for the JSP files in a web application. It has >- two subelements, taglib and jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:element name="taglib" >- type="javaee:taglibType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="jsp-property-group" >- type="javaee:jsp-property-groupType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-fileType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-file element contains the full path to a JSP file >- within the web application beginning with a `/'. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:simpleContent> >- <xsd:restriction base="javaee:pathType"/> >- </xsd:simpleContent> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="jsp-property-groupType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The jsp-property-groupType is used to group a number of >- files so they can be given global property information. >- All files so described are deemed to be JSP files. The >- following additional properties can be described: >- >- - Control whether EL is ignored. >- - Control whether scripting elements are invalid. >- - Indicate pageEncoding information. >- - Indicate that a resource is a JSP document (XML). >- - Prelude and Coda automatic includes. >- - Control whether the character sequence #{ is allowed >- when used as a String literal. >- - Control whether template text containing only >- whitespaces must be removed from the response output. >- - Indicate the default contentType information. >- - Indicate the default buffering model for JspWriter >- - Control whether error should be raised for the use of >- undeclared namespaces in a JSP page. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup"/> >- <xsd:element name="url-pattern" >- type="javaee:url-patternType" >- maxOccurs="unbounded"/> >- <xsd:element name="el-ignored" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily set the isELIgnored >- property of a group of JSP pages. By default, the >- EL evaluation is enabled for Web Applications using >- a Servlet 2.4 or greater web.xml, and disabled >- otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="page-encoding" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of page-encoding are those of the >- pageEncoding page directive. It is a >- translation-time error to name different encodings >- in the pageEncoding attribute of the page directive >- of a JSP page and in a JSP configuration element >- matching the page. It is also a translation-time >- error to name different encodings in the prolog >- or text declaration of a document in XML syntax and >- in a JSP configuration element matching the document. >- It is legal to name the same encoding through >- mulitple mechanisms. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="scripting-invalid" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Can be used to easily disable scripting in a >- group of JSP pages. By default, scripting is >- enabled. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="is-xml" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- If true, denotes that the group of resources >- that match the URL pattern are JSP documents, >- and thus must be interpreted as XML documents. >- If false, the resources are assumed to not >- be JSP documents, unless there is another >- property group that indicates otherwise. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-prelude" >- type="javaee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-prelude element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the beginning of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="include-coda" >- type="javaee:pathType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- The include-coda element is a context-relative >- path that must correspond to an element in the >- Web Application. When the element is present, >- the given path will be automatically included (as >- in an include directive) at the end of each >- JSP page in this jsp-property-group. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="deferred-syntax-allowed-as-literal" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The character sequence #{ is reserved for EL expressions. >- Consequently, a translation error occurs if the #{ >- character sequence is used as a String literal, unless >- this element is enabled (true). Disabled (false) by >- default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="trim-directive-whitespaces" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Indicates that template text containing only whitespaces >- must be removed from the response output. It has no >- effect on JSP documents (XML syntax). Disabled (false) >- by default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="default-content-type" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of default-content-type are those of the >- contentType page directive. It specifies the default >- response contentType if the page directive does not include >- a contentType attribute. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="buffer" >- type="javaee:string" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The valid values of buffer are those of the >- buffer page directive. It specifies if buffering should be >- used for the output to response, and if so, the size of the >- buffer to use. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="error-on-undeclared-namespace" >- type="javaee:true-falseType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The default behavior when a tag with unknown namespace is used >- in a JSP page (regular syntax) is to silently ignore it. If >- set to true, then an error must be raised during the translation >- time when an undeclared tag is used in a JSP page. Disabled >- (false) by default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="taglibType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglibType defines the syntax for declaring in >- the deployment descriptor that a tag library is >- available to the application. This can be done >- to override implicit map entries from TLD files and >- from the container. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:element name="taglib-uri" >- type="javaee:string"> >- <xsd:annotation> >- <xsd:documentation> >- >- A taglib-uri element describes a URI identifying a >- tag library used in the web application. The body >- of the taglib-uri element may be either an >- absolute URI specification, or a relative URI. >- There should be no entries in web.xml with the >- same taglib-uri value. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="taglib-location" >- type="javaee:pathType"> >- <xsd:annotation> >- <xsd:documentation> >- >- the taglib-location element contains the location >- (as a resource relative to the root of the web >- application) where to find the Tag Library >- Description file for the tag library. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" >- type="xsd:ID"/> >- </xsd:complexType> >- >-</xsd:schema> >Index: java/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd >=================================================================== >Cannot display: file marked as a binary type. >svn:mime-type = application/xml-dtd >Index: java/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd >=================================================================== >Cannot display: file marked as a binary type. >svn:mime-type = application/xml-dtd >Index: java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd (working copy) >@@ -1,989 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!-- >- 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. >---> >-<xsd:schema >- 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" >- xmlns:xml="http://www.w3.org/XML/1998/namespace" >- elementFormDefault="qualified" >- attributeFormDefault="unqualified" >- version="2.0"> >- >- <xsd:annotation> >- <xsd:documentation> >- %W% %G% >- </xsd:documentation> >- </xsd:annotation> >- <xsd:annotation> >- <xsd:documentation> >- <![CDATA[ >- >- This is the XML Schema for the JSP Taglibrary >- descriptor. All Taglibrary descriptors must >- indicate the tag library schema by using the Taglibrary >- namespace: >- >- http://java.sun.com/xml/ns/j2ee >- >- and by indicating the version of the schema by >- using the version element as shown below: >- >- <taglib xmlns="http://java.sun.com/xml/ns/j2ee" >- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >- xsi:schemaLocation="..." >- version="2.0"> >- ... >- </taglib> >- >- The instance documents may indicate the published >- version of the schema using xsi:schemaLocation attribute >- for J2EE namespace with the following location: >- >- http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd >- >- ]]> >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:include schemaLocation="j2ee_1_4.xsd"/> >- >- >-<!-- **************************************************** --> >- >- >- <xsd:element name="taglib" type="j2ee:tldTaglibType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglib tag is the document root. >- The definition of taglib is provided >- by the tldTaglibType. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:unique name="tag-name-uniqueness"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglib element contains, among other things, tag and >- tag-file elements. >- The name subelements of these elements must each be unique. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:selector xpath="j2ee:tag|j2ee:tag-file"/> >- <xsd:field xpath="j2ee:name"/> >- </xsd:unique> >- >- <xsd:unique name="function-name-uniqueness"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglib element contains function elements. >- The name subelements of these elements must each be unique. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:selector xpath="j2ee:function"/> >- <xsd:field xpath="j2ee:name"/> >- </xsd:unique> >- >- </xsd:element> >- >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="body-contentType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Specifies the type of body that is valid for a tag. >- This value is used by the JSP container to validate >- that a tag invocation has the correct body syntax and >- by page composition tools to assist the page author >- in providing a valid tag body. >- >- There are currently four values specified: >- >- tagdependent The body of the tag is interpreted by the tag >- implementation itself, and is most likely >- in a different "language", e.g embedded SQL >- statements. >- >- JSP The body of the tag contains nested JSP >- syntax. >- >- empty The body must be empty >- >- scriptless The body accepts only template text, EL >- Expressions, and JSP action elements. No >- scripting elements are allowed. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:simpleContent> >- <xsd:restriction base="j2ee:string"> >- <xsd:enumeration value="tagdependent"/> >- <xsd:enumeration value="JSP"/> >- <xsd:enumeration value="empty"/> >- <xsd:enumeration value="scriptless"/> >- </xsd:restriction> >- </xsd:simpleContent> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="extensibleType" abstract="true"> >- <xsd:annotation> >- <xsd:documentation> >- >- The extensibleType is an abstract base type that is used to >- define the type of extension-elements. Instance documents >- must substitute a known type to define the extension by >- using xsi:type attribute to define the actual type of >- extension-elements. >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="functionType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The function element is used to provide information on each >- function in the tag library that is to be exposed to the EL. >- >- The function element may have several subelements defining: >- >- description Optional tag-specific information >- >- display-name A short name that is intended to be >- displayed by tools >- >- icon Optional icon element that can be used >- by tools >- >- name A unique name for this function >- >- function-class Provides the name of the Java class that >- implements the function >- >- function-signature Provides the signature, as in the Java >- Language Specification, of the Java >- method that is to be used to implement >- the function. >- >- example Optional informal description of an >- example of a use of this function >- >- function-extension Zero or more extensions that provide extra >- information about this function, for tool >- consumption >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:group ref="j2ee:descriptionGroup"/> >- <xsd:element name="name" >- type="j2ee:tld-canonical-nameType"> >- <xsd:annotation> >- <xsd:documentation> >- >- A unique name for this function. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="function-class" >- type="j2ee:fully-qualified-classType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Provides the fully-qualified class name of the Java >- class containing the static method that implements >- the function. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="function-signature" >- type="j2ee:string"> >- <xsd:annotation> >- <xsd:documentation> >- >- Provides the signature, of the static Java method that is >- to be used to implement the function. The syntax of the >- function-signature element is as follows: >- >- FunctionSignature ::= ReturnType S MethodName S? >- '(' S? Parameters? S? ')' >- >- ReturnType ::= Type >- >- MethodName ::= Identifier >- >- Parameters ::= Parameter >- | ( Parameter S? ',' S? Parameters ) >- >- Parameter ::= Type >- >- Where: >- >- * Type is a basic type or a fully qualified Java class name >- (including package name), as per the 'Type' production >- in the Java Language Specification, Second Edition, >- Chapter 18. >- >- * Identifier is a Java identifier, as per the 'Identifier' >- production in the Java Language Specification, Second >- Edition, Chapter 18. >- >- Example: >- >- java.lang.String nickName( java.lang.String, int ) >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="example" >- type="j2ee:xsdStringType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The example element contains an informal description >- of an example of the use of this function. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="function-extension" >- type="j2ee:tld-extensionType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- Function extensions are for tool use only and must not affect >- the behavior of a container. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tagFileType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines an action in this tag library that is implemented >- as a .tag file. >- >- The tag-file element has two required subelements: >- >- description Optional tag-specific information >- >- display-name A short name that is intended to be >- displayed by tools >- >- icon Optional icon element that can be used >- by tools >- >- name The unique action name >- >- path Where to find the .tag file implementing this >- action, relative to the root of the web >- application or the root of the JAR file for a >- tag library packaged in a JAR. This must >- begin with /WEB-INF/tags if the .tag file >- resides in the WAR, or /META-INF/tags if the >- .tag file resides in a JAR. >- >- example Optional informal description of an >- example of a use of this tag >- >- tag-extension Zero or more extensions that provide extra >- information about this tag, for tool >- consumption >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:group ref="j2ee:descriptionGroup"/> >- <xsd:element name="name" >- type="j2ee:tld-canonical-nameType"/> >- <xsd:element name="path" >- type="j2ee:pathType"/> >- <xsd:element name="example" >- type="j2ee:xsdStringType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The example element contains an informal description >- of an example of the use of a tag. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="tag-extension" >- type="j2ee:tld-extensionType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- Tag extensions are for tool use only and must not affect >- the behavior of a container. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tagType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The tag defines a unique tag in this tag library. It has one >- attribute, id. >- >- The tag element may have several subelements defining: >- >- description Optional tag-specific information >- >- display-name A short name that is intended to be >- displayed by tools >- >- icon Optional icon element that can be used >- by tools >- >- name The unique action name >- >- tag-class The tag handler class implementing >- javax.servlet.jsp.tagext.JspTag >- >- tei-class An optional subclass of >- javax.servlet.jsp.tagext.TagExtraInfo >- >- body-content The body content type >- >- variable Optional scripting variable information >- >- attribute All attributes of this action that are >- evaluated prior to invocation. >- >- dynamic-attributes Whether this tag supports additional >- attributes with dynamic names. If >- true, the tag-class must implement the >- javax.servlet.jsp.tagext.DynamicAttributes >- interface. Defaults to false. >- >- example Optional informal description of an >- example of a use of this tag >- >- tag-extension Zero or more extensions that provide extra >- information about this tag, for tool >- consumption >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:group ref="j2ee:descriptionGroup"/> >- <xsd:element name="name" >- type="j2ee:tld-canonical-nameType"/> >- <xsd:element name="tag-class" >- type="j2ee:fully-qualified-classType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines the subclass of javax.serlvet.jsp.tagext.JspTag >- that implements the request time semantics for >- this tag. (required) >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="tei-class" >- type="j2ee:fully-qualified-classType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo >- for this tag. (optional) >- >- If this is not given, the class is not consulted at >- translation time. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="body-content" >- type="j2ee:body-contentType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Specifies the format for the body of this tag. >- The default in JSP 1.2 was "JSP" but because this >- is an invalid setting for simple tag handlers, there >- is no longer a default in JSP 2.0. A reasonable >- default for simple tag handlers is "scriptless" if >- the tag can have a body. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="variable" >- type="j2ee:variableType" >- minOccurs="0" maxOccurs="unbounded"/> >- <xsd:element name="attribute" >- type="j2ee:tld-attributeType" >- minOccurs="0" maxOccurs="unbounded"/> >- <xsd:element name="dynamic-attributes" >- type="j2ee:generic-booleanType" >- minOccurs="0"/> >- <xsd:element name="example" >- type="j2ee:xsdStringType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The example element contains an informal description >- of an example of the use of a tag. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="tag-extension" >- type="j2ee:tld-extensionType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- Tag extensions are for tool use only and must not affect >- the behavior of a container. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tld-attributeType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The attribute element defines an attribute for the nesting >- tag. The attributre element may have several subelements >- defining: >- >- description a description of the attribute >- >- name the name of the attribute >- >- required whether the attribute is required or >- optional >- >- rtexprvalue whether the attribute is a runtime attribute >- >- type the type of the attributes >- >- fragment whether this attribute is a fragment >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:element name="description" >- type="j2ee:descriptionType" >- minOccurs="0" maxOccurs="unbounded"/> >- <xsd:element name="name" >- type="j2ee:java-identifierType"/> >- <xsd:element name="required" >- type="j2ee:generic-booleanType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines if the nesting attribute is required or >- optional. >- >- If not present then the default is "false", i.e >- the attribute is optional. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- >- <xsd:choice> >- <xsd:sequence> >- <xsd:element name="rtexprvalue" >- type="j2ee:generic-booleanType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines if the nesting attribute can have scriptlet >- expressions as a value, i.e the value of the >- attribute may be dynamically calculated at request >- time, as opposed to a static value determined at >- translation time. >- >- If not present then the default is "false", i.e the >- attribute has a static value >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="type" >- type="j2ee:fully-qualified-classType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines the Java type of the attributes value. For >- static values (those determined at translation time) >- the type is always java.lang.String. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:element name="fragment" >- type="j2ee:generic-booleanType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- "true" if this attribute is of type >- javax.jsp.tagext.JspFragment, representing dynamic >- content that can be re-evaluated as many times >- as needed by the tag handler. If omitted or "false", >- the default is still type="java.lang.String" >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:choice> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tld-canonical-nameType"> >- >- <xsd:annotation> >- <xsd:documentation> >- >- Defines the canonical name of a tag or attribute being >- defined. >- >- The name must conform to the lexical rules for an NMTOKEN. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:simpleContent> >- <xsd:restriction base="j2ee:xsdNMTOKENType"/> >- </xsd:simpleContent> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tld-extensionType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The tld-extensionType is used to indicate >- extensions to a specific TLD element. >- >- It is used by elements to designate an extension block >- that is targeted to a specific extension designated by >- a set of extension elements that are declared by a >- namespace. The namespace identifies the extension to >- the tool that processes the extension. >- >- The type of the extension-element is abstract. Therefore, >- a concrete type must be specified by the TLD using >- xsi:type attribute for each extension-element. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:element name="extension-element" >- type="j2ee:extensibleType" >- maxOccurs="unbounded"/> >- </xsd:sequence> >- >- <xsd:attribute name="namespace" >- use="required" >- type="xsd:anyURI"/> >- <xsd:attribute name="id" type="xsd:ID"/> >- >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="tldTaglibType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The taglib tag is the document root, it defines: >- >- description a simple string describing the "use" of this taglib, >- should be user discernable >- >- display-name the display-name element contains a >- short name that is intended to be displayed >- by tools >- >- icon optional icon that can be used by tools >- >- tlib-version the version of the tag library implementation >- >- short-name a simple default short name that could be >- used by a JSP authoring tool to create >- names with a mnemonic value; for example, >- the it may be used as the prefered prefix >- value in taglib directives >- >- uri a uri uniquely identifying this taglib >- >- validator optional TagLibraryValidator information >- >- listener optional event listener specification >- >- tag tags in this tag library >- >- tag-file tag files in this tag library >- >- function zero or more EL functions defined in this >- tag library >- >- taglib-extension zero or more extensions that provide extra >- information about this taglib, for tool >- consumption >- >- </xsd:documentation> >- </xsd:annotation> >- <xsd:sequence> >- <xsd:group ref="j2ee:descriptionGroup"/> >- <xsd:element name="tlib-version" >- type="j2ee:dewey-versionType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Describes this version (number) of the taglibrary. >- It is described as a dewey decimal. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- >- <xsd:element name="short-name" >- type="j2ee:tld-canonical-nameType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines a simple default name that could be used by >- a JSP authoring tool to create names with a >- mnemonicvalue; for example, it may be used as the >- preferred prefix value in taglib directives. Do >- not use white space, and do not start with digits >- or underscore. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="uri" >- type="j2ee:xsdAnyURIType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines a public URI that uniquely identifies this >- version of the taglibrary. Leave it empty if it >- does not apply. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- <xsd:element name="validator" >- type="j2ee:validatorType" >- minOccurs="0"> >- </xsd:element> >- <xsd:element name="listener" >- type="j2ee:listenerType" >- minOccurs="0" maxOccurs="unbounded"> >- </xsd:element> >- <xsd:element name="tag" >- type="j2ee:tagType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="tag-file" >- type="j2ee:tagFileType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="function" >- type="j2ee:functionType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="taglib-extension" >- type="j2ee:tld-extensionType" >- minOccurs="0" >- maxOccurs="unbounded"> >- <xsd:annotation> >- <xsd:documentation> >- >- Taglib extensions are for tool use only and must not affect >- the behavior of a container. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="version" >- type="j2ee:dewey-versionType" >- fixed="2.0" >- use="required"> >- <xsd:annotation> >- <xsd:documentation> >- >- Describes the JSP version (number) this taglibrary >- requires in order to function (dewey decimal) >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:attribute> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="validatorType"> >- <xsd:annotation> >- <xsd:documentation> >- >- A validator that can be used to validate >- the conformance of a JSP page to using this tag library is >- defined by a validatorType. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:element name="description" >- type="j2ee:descriptionType" >- minOccurs="0" >- maxOccurs="unbounded"/> >- <xsd:element name="validator-class" >- type="j2ee:fully-qualified-classType"> >- <xsd:annotation> >- <xsd:documentation> >- >- Defines the TagLibraryValidator class that can be used >- to validate the conformance of a JSP page to using this >- tag library. >- >- </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. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="variable-scopeType"> >- <xsd:annotation> >- <xsd:documentation> >- >- This type defines scope of the scripting variable. See >- TagExtraInfo for details. The allowed values are, >- "NESTED", "AT_BEGIN" and "AT_END". >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:simpleContent> >- <xsd:restriction base="j2ee:string"> >- <xsd:enumeration value="NESTED"/> >- <xsd:enumeration value="AT_BEGIN"/> >- <xsd:enumeration value="AT_END"/> >- </xsd:restriction> >- </xsd:simpleContent> >- </xsd:complexType> >- >-<!-- **************************************************** --> >- >- <xsd:complexType name="variableType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The variableType provides information on the scripting >- variables defined by using this tag. It is a (translation >- time) error for a tag that has one or more variable >- subelements to have a TagExtraInfo class that returns a >- non-null value from a call to getVariableInfo(). >- >- The subelements of variableType are of the form: >- >- description Optional description of this >- variable >- >- name-given The variable name as a constant >- >- name-from-attribute The name of an attribute whose >- (translation time) value will >- give the name of the >- variable. One of name-given or >- name-from-attribute is required. >- >- variable-class Name of the class of the variable. >- java.lang.String is default. >- >- declare Whether the variable is declared >- or not. True is the default. >- >- scope The scope of the scripting varaible >- defined. NESTED is default. >- >- </xsd:documentation> >- </xsd:annotation> >- >- <xsd:sequence> >- <xsd:element name="description" >- type="j2ee:descriptionType" >- minOccurs="0" maxOccurs="unbounded"/> >- <xsd:choice> >- <xsd:element name="name-given" >- type="j2ee:java-identifierType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The name for the scripting variable. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- >- <xsd:element name="name-from-attribute" >- type="j2ee:java-identifierType"> >- <xsd:annotation> >- <xsd:documentation> >- >- The name of an attribute whose >- (translation-time) value will give the name of >- the variable. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:choice> >- <xsd:element name="variable-class" >- type="j2ee:fully-qualified-classType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The optional name of the class for the scripting >- variable. The default is java.lang.String. >- >- </xsd:documentation> >- </xsd:annotation> >- >- </xsd:element> >- >- <xsd:element name="declare" >- type="j2ee:generic-booleanType" >- minOccurs="0"> >- >- <xsd:annotation> >- <xsd:documentation> >- >- Whether the scripting variable is to be defined >- or not. See TagExtraInfo for details. This >- element is optional and "true" is the default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- <xsd:element name="scope" >- type="j2ee:variable-scopeType" >- minOccurs="0"> >- <xsd:annotation> >- <xsd:documentation> >- >- The element is optional and "NESTED" is the default. >- >- </xsd:documentation> >- </xsd:annotation> >- </xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID"/> >- </xsd:complexType> >- >-</xsd:schema> >- >Index: java/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd >=================================================================== >--- java/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd (revision 1500552) >+++ java/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd (working copy) >@@ -1,229 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >- >-<!-- >- 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 XSD contains only the programatic elements required for an implementation. >- ** For the XSD from Sun that includes documentation and other copyrighted information >- ** please refer to http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd for a fully documented and latest >- ** XSD. >---> >- >-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/javaee" >- xmlns:javaee="http://java.sun.com/xml/ns/javaee" >- xmlns:xsd="http://www.w3.org/2001/XMLSchema" >- elementFormDefault="qualified" >- attributeFormDefault="unqualified" >- version="2.1"> >- >- <xsd:include schemaLocation="javaee_5.xsd" /> >- >- <xsd:element name="taglib" type="javaee:tldTaglibType"> >- <xsd:unique name="tag-name-uniqueness"> >- <xsd:selector xpath="javaee:tag|javaee:tag-file" /> >- <xsd:field xpath="javaee:name" /> >- </xsd:unique> >- >- <xsd:unique name="function-name-uniqueness"> >- <xsd:selector xpath="javaee:function" /> >- <xsd:field xpath="javaee:name" /> >- </xsd:unique> >- </xsd:element> >- >- <xsd:complexType name="body-contentType"> >- <xsd:simpleContent> >- <xsd:restriction base="javaee:string"> >- <xsd:enumeration value="tagdependent" /> >- <xsd:enumeration value="JSP" /> >- <xsd:enumeration value="empty" /> >- <xsd:enumeration value="scriptless" /> >- </xsd:restriction> >- </xsd:simpleContent> >- </xsd:complexType> >- >- <xsd:complexType name="extensibleType" abstract="true"> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="functionType"> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup" /> >- <xsd:element name="name" type="javaee:tld-canonical-nameType"></xsd:element> >- <xsd:element name="function-class" type="javaee:fully-qualified-classType"></xsd:element> >- <xsd:element name="function-signature" type="javaee:string"></xsd:element> >- <xsd:element name="example" type="javaee:xsdStringType" minOccurs="0"></xsd:element> >- <xsd:element name="function-extension" type="javaee:tld-extensionType" minOccurs="0" maxOccurs="unbounded"></xsd:element> >- >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="tagFileType"> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup" /> >- <xsd:element name="name" type="javaee:tld-canonical-nameType" /> >- <xsd:element name="path" type="javaee:pathType" /> >- <xsd:element name="example" type="javaee:xsdStringType" minOccurs="0"></xsd:element> >- <xsd:element name="tag-extension" type="javaee:tld-extensionType" minOccurs="0" maxOccurs="unbounded"></xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="tagType"> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup" /> >- <xsd:element name="name" type="javaee:tld-canonical-nameType" /> >- <xsd:element name="tag-class" type="javaee:fully-qualified-classType"></xsd:element> >- <xsd:element name="tei-class" type="javaee:fully-qualified-classType" minOccurs="0"></xsd:element> >- <xsd:element name="body-content" type="javaee:body-contentType"></xsd:element> >- <xsd:element name="variable" type="javaee:variableType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="attribute" type="javaee:tld-attributeType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="dynamic-attributes" type="javaee:generic-booleanType" minOccurs="0" /> >- <xsd:element name="example" type="javaee:xsdStringType" minOccurs="0" /> >- <xsd:element name="tag-extension" type="javaee:tld-extensionType" minOccurs="0" maxOccurs="unbounded" /> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="tld-attributeType"> >- <xsd:sequence> >- <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded" /> >- >- <xsd:element name="name" type="javaee:java-identifierType" /> >- <xsd:element name="required" type="javaee:generic-booleanType" minOccurs="0"></xsd:element> >- <xsd:choice> >- >- <xsd:sequence> >- <xsd:sequence minOccurs="0"> >- <xsd:element name="rtexprvalue" type="javaee:generic-booleanType"></xsd:element> >- >- <xsd:element name="type" type="javaee:fully-qualified-classType" minOccurs="0"></xsd:element> >- </xsd:sequence> >- >- <xsd:choice> >- <xsd:element name="deferred-value" type="javaee:tld-deferred-valueType" minOccurs="0"></xsd:element> >- <xsd:element name="deferred-method" type="javaee:tld-deferred-methodType" minOccurs="0"></xsd:element> >- </xsd:choice> >- </xsd:sequence> >- >- <xsd:element name="fragment" type="javaee:generic-booleanType" minOccurs="0"></xsd:element> >- >- </xsd:choice> >- >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="tld-canonical-nameType"> >- <xsd:simpleContent> >- <xsd:restriction base="javaee:xsdNMTOKENType" /> >- </xsd:simpleContent> >- </xsd:complexType> >- >- <xsd:complexType name="tld-deferred-methodType"> >- <xsd:sequence> >- <xsd:element name="method-signature" type="javaee:string" minOccurs="0"></xsd:element> >- </xsd:sequence> >- >- <xsd:attribute name="id" type="xsd:ID" /> >- >- </xsd:complexType> >- >- <xsd:complexType name="tld-deferred-valueType"> >- >- <xsd:sequence> >- <xsd:element name="type" type="javaee:fully-qualified-classType" minOccurs="0"></xsd:element> >- >- </xsd:sequence> >- >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="tld-extensionType"> >- <xsd:sequence> >- <xsd:element name="extension-element" type="javaee:extensibleType" maxOccurs="unbounded" /> >- </xsd:sequence> >- >- <xsd:attribute name="namespace" use="required" type="xsd:anyURI" /> >- <xsd:attribute name="id" type="xsd:ID" /> >- >- </xsd:complexType> >- >- <xsd:complexType name="tldTaglibType"> >- <xsd:sequence> >- <xsd:group ref="javaee:descriptionGroup" /> >- <xsd:element name="tlib-version" type="javaee:dewey-versionType"></xsd:element> >- >- <xsd:element name="short-name" type="javaee:tld-canonical-nameType"> >- >- </xsd:element> >- >- <xsd:element name="uri" type="javaee:xsdAnyURIType" minOccurs="0"> >- >- </xsd:element> >- <xsd:element name="validator" type="javaee:validatorType" minOccurs="0"> >- >- </xsd:element> >- <xsd:element name="listener" type="javaee:listenerType" minOccurs="0" maxOccurs="unbounded"></xsd:element> >- <xsd:element name="tag" type="javaee:tagType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="tag-file" type="javaee:tagFileType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="function" type="javaee:functionType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="taglib-extension" type="javaee:tld-extensionType" minOccurs="0" maxOccurs="unbounded"></xsd:element> >- </xsd:sequence> >- <xsd:attribute name="version" type="javaee:dewey-versionType" fixed="2.1" use="required"></xsd:attribute> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="validatorType"> >- <xsd:sequence> >- <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded" /> >- <xsd:element name="validator-class" type="javaee:fully-qualified-classType"></xsd:element> >- <xsd:element name="init-param" type="javaee:param-valueType" minOccurs="0" maxOccurs="unbounded"></xsd:element> >- >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >- >- <xsd:complexType name="variable-scopeType"> >- <xsd:simpleContent> >- >- <xsd:restriction base="javaee:string"> >- <xsd:enumeration value="NESTED" /> >- <xsd:enumeration value="AT_BEGIN" /> >- <xsd:enumeration value="AT_END" /> >- </xsd:restriction> >- </xsd:simpleContent> >- </xsd:complexType> >- >- <xsd:complexType name="variableType"> >- <xsd:sequence> >- <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded" /> >- >- <xsd:choice> >- <xsd:element name="name-given" type="javaee:java-identifierType"></xsd:element> >- >- <xsd:element name="name-from-attribute" type="javaee:java-identifierType"></xsd:element> >- </xsd:choice> >- <xsd:element name="variable-class" type="javaee:fully-qualified-classType" minOccurs="0"></xsd:element> >- >- <xsd:element name="declare" type="javaee:generic-booleanType" minOccurs="0"></xsd:element> >- <xsd:element name="scope" type="javaee:variable-scopeType" minOccurs="0"></xsd:element> >- </xsd:sequence> >- <xsd:attribute name="id" type="xsd:ID" /> >- </xsd:complexType> >-</xsd:schema> >Index: java/org/apache/catalina/core/StandardContext.java >=================================================================== >--- java/org/apache/catalina/core/StandardContext.java (revision 1500552) >+++ java/org/apache/catalina/core/StandardContext.java (working copy) >@@ -123,6 +123,7 @@ > import org.apache.naming.ContextBindings; > import org.apache.tomcat.InstanceManager; > import org.apache.tomcat.JarScanner; >+import org.apache.tomcat.XmlIdentifiers; > import org.apache.tomcat.util.ExceptionUtils; > import org.apache.tomcat.util.IntrospectionUtils; > import org.apache.tomcat.util.scan.StandardJarScanner; >@@ -5759,15 +5760,7 @@ > */ > @Override > public boolean isServlet22() { >- >- if (this.publicId == null) >- return (false); >- if (this.publicId.equals >- (org.apache.catalina.startup.Constants.WebDtdPublicId_22)) >- return (true); >- else >- return (false); >- >+ return XmlIdentifiers.WEB_22_DTD.equals(publicId); > } > > @Override >Index: java/org/apache/catalina/deploy/LocalStrings.properties >=================================================================== >--- java/org/apache/catalina/deploy/LocalStrings.properties (revision 1500552) >+++ java/org/apache/catalina/deploy/LocalStrings.properties (working copy) >@@ -42,8 +42,8 @@ > webXml.mergeConflictSessionTrackingMode=The session tracking modes were defined inconsistently in multiple fragments including fragment with name [{0}] located at [{1}] > webXml.mergeConflictString=The [{0}] with name [{1}] was defined inconsistently in multiple fragments including fragment with name [{2}] located at [{3}] > webXml.multipleOther=Multiple others entries in ordering >-webxml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's for web.xml files so the version could not be identified >-webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This component of the version string will be ignored. >+webXml.unrecognisedPublicId=The public ID [{0}] did not match any of the known public ID's for web.xml files so the version could not be identified >+webXml.version.unknown=Unknown version string [{0}]. Default version will be used. > webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml absolute-ordering tag! > > namingResources.cleanupCloseFailed=Failed to invoke method [{0}] for resource [{1}] in container [{2}] so no cleanup was performed for that resource >Index: java/org/apache/catalina/deploy/WebXml.java >=================================================================== >--- java/org/apache/catalina/deploy/WebXml.java (revision 1500552) >+++ java/org/apache/catalina/deploy/WebXml.java (working copy) >@@ -32,6 +32,7 @@ > import javax.servlet.ServletContext; > import javax.servlet.SessionTrackingMode; > >+import org.apache.tomcat.XmlIdentifiers; > import org.apache.tomcat.util.res.StringManager; > > /** >@@ -127,42 +128,28 @@ > * @param version Values of <code>null</code> will be ignored > */ > public void setVersion(String version) { >- if (version == null) return; >- >- // Update major and minor version >- // Expected format is n.n - allow for any number of digits just in case >- String major = null; >- String minor = null; >- int split = version.indexOf('.'); >- if (split < 0) { >- // Major only >- major = version; >- } else { >- major = version.substring(0, split); >- minor = version.substring(split + 1); >+ if (version == null) { >+ return; > } >- if (major == null || major.length() == 0) { >- majorVersion = 0; >- } else { >- try { >- majorVersion = Integer.parseInt(major); >- } catch (NumberFormatException nfe) { >- log.warn(sm.getString("webXml.version.nfe", major, version), >- nfe); >- majorVersion = 0; >- } >- } >- >- if (minor == null || minor.length() == 0) { >- minorVersion = 0; >- } else { >- try { >- minorVersion = Integer.parseInt(minor); >- } catch (NumberFormatException nfe) { >- log.warn(sm.getString("webXml.version.nfe", minor, version), >- nfe); >+ switch (version) { >+ case "2.4": >+ majorVersion = 2; >+ minorVersion = 4; >+ break; >+ case "2.5": >+ majorVersion = 2; >+ minorVersion = 5; >+ break; >+ case "3.0": >+ majorVersion = 3; > minorVersion = 0; >- } >+ break; >+ case "3.1": >+ majorVersion = 3; >+ minorVersion = 1; >+ break; >+ default: >+ log.warn(sm.getString("webXml.version.unknown", version)); > } > } > >@@ -173,48 +160,23 @@ > public void setPublicId(String publicId) { > // Update major and minor version > if (publicId == null) { >- // skip >- } else if (org.apache.catalina.startup.Constants.WebSchemaPublicId_31. >- equalsIgnoreCase(publicId) || >- org.apache.catalina.startup.Constants.WebFragmentSchemaPublicId_31. >- equalsIgnoreCase(publicId)) { >- majorVersion = 3; >- minorVersion = 1; >- this.publicId = publicId; >- } else if (org.apache.catalina.startup.Constants.WebSchemaPublicId_30. >- equalsIgnoreCase(publicId) || >- org.apache.catalina.startup.Constants.WebFragmentSchemaPublicId_30. >- equalsIgnoreCase(publicId)) { >- majorVersion = 3; >- minorVersion = 0; >- this.publicId = publicId; >- } else if (org.apache.catalina.startup.Constants.WebSchemaPublicId_25. >- equalsIgnoreCase(publicId)) { >- majorVersion = 2; >- minorVersion = 5; >- this.publicId = publicId; >- } else if (org.apache.catalina.startup.Constants.WebSchemaPublicId_24. >- equalsIgnoreCase(publicId)) { >- majorVersion = 2; >- minorVersion = 4; >- this.publicId = publicId; >- } else if (org.apache.catalina.startup.Constants.WebDtdPublicId_23. >- equalsIgnoreCase(publicId)) { >- majorVersion = 2; >- minorVersion = 3; >- this.publicId = publicId; >- } else if (org.apache.catalina.startup.Constants.WebDtdPublicId_22. >- equalsIgnoreCase(publicId)) { >- majorVersion = 2; >- minorVersion = 2; >- this.publicId = publicId; >- } else if ("datatypes".equals(publicId)) { >- // Will occur when validation is enabled and dependencies are >- // traced back. Ignore it. >- } else { >- // Unrecognised publicId >- log.warn(sm.getString("webxml.unrecognisedPublicId", publicId)); >+ return; > } >+ switch (publicId) { >+ case XmlIdentifiers.WEB_22_DTD: >+ majorVersion = 2; >+ minorVersion = 2; >+ this.publicId = publicId; >+ break; >+ case XmlIdentifiers.WEB_23_DTD: >+ majorVersion = 2; >+ minorVersion = 3; >+ this.publicId = publicId; >+ break; >+ default: >+ log.warn(sm.getString("webXml.unrecognisedPublicId", publicId)); >+ break; >+ } > } > > // Optional metadata-complete attribute >Index: java/org/apache/catalina/startup/Constants.java >=================================================================== >--- java/org/apache/catalina/startup/Constants.java (revision 1500552) >+++ java/org/apache/catalina/startup/Constants.java (working copy) >@@ -45,180 +45,4 @@ > * @see Tomcat > */ > public static final String NoDefaultWebXml = "org/apache/catalina/startup/NO_DEFAULT_XML"; >- >- // J2EE >- public static final String J2eeSchemaPublicId_14 = >- "j2ee_1_4.xsd"; >- public static final String J2eeSchemaResourcePath_14 = >- "/javax/servlet/resources/j2ee_1_4.xsd"; >- >- public static final String JavaeeSchemaPublicId_5 = >- "javaee_5.xsd"; >- public static final String JavaeeSchemaResourcePath_5 = >- "/javax/servlet/resources/javaee_5.xsd"; >- >- public static final String JavaeeSchemaPublicId_6 = >- "javaee_6.xsd"; >- public static final String JavaeeSchemaResourcePath_6 = >- "/javax/servlet/resources/javaee_6.xsd"; >- >- public static final String JavaeeSchemaPublicId_7 = >- "javaee_7.xsd"; >- public static final String JavaeeSchemaResourcePath_7 = >- "/javax/servlet/resources/javaee_7.xsd"; >- >- >- // W3C >- public static final String W3cSchemaPublicId_10 = >- "xml.xsd"; >- public static final String W3cSchemaResourcePath_10 = >- "/javax/servlet/resources/xml.xsd"; >- >- public static final String W3cSchemaDTDPublicId_10 = >- "XMLSchema.dtd"; >- public static final String W3cSchemaDTDResourcePath_10 = >- "/javax/servlet/resources/XMLSchema.dtd"; >- >- public static final String W3cDatatypesDTDPublicId_10 = >- "datatypes.dtd"; >- public static final String W3cDatatypesDTDResourcePath_10 = >- "/javax/servlet/resources/datatypes.dtd"; >- >- >- // JSP >- public static final String JspSchemaPublicId_20 = >- "jsp_2_0.xsd"; >- public static final String JspSchemaResourcePath_20 = >- "/javax/servlet/jsp/resources/jsp_2_0.xsd"; >- >- public static final String JspSchemaPublicId_21 = >- "jsp_2_1.xsd"; >- public static final String JspSchemaResourcePath_21 = >- "/javax/servlet/jsp/resources/jsp_2_1.xsd"; >- >- public static final String JspSchemaPublicId_22 = >- "jsp_2_2.xsd"; >- public static final String JspSchemaResourcePath_22 = >- "/javax/servlet/jsp/resources/jsp_2_2.xsd"; >- >- public static final String JspSchemaPublicId_23 = >- "jsp_2_3.xsd"; >- public static final String JspSchemaResourcePath_23 = >- "/javax/servlet/jsp/resources/jsp_2_3.xsd"; >- >- >- // TLD >- public static final String TldDtdPublicId_11 = >- "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"; >- public static final String TldDtdResourcePath_11 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd"; >- >- public static final String TldDtdPublicId_12 = >- "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"; >- public static final String TldDtdResourcePath_12 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"; >- >- public static final String TldSchemaPublicId_20 = >- "web-jsptaglibrary_2_0.xsd"; >- public static final String TldSchemaResourcePath_20 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd"; >- >- public static final String TldSchemaPublicId_21 = >- "web-jsptaglibrary_2_1.xsd"; >- public static final String TldSchemaResourcePath_21 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd"; >- >- >- // web.xml >- public static final String WebDtdPublicId_22 = >- "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; >- public static final String WebDtdResourcePath_22 = >- "/javax/servlet/resources/web-app_2_2.dtd"; >- >- public static final String WebDtdPublicId_23 = >- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"; >- public static final String WebDtdResourcePath_23 = >- "/javax/servlet/resources/web-app_2_3.dtd"; >- >- public static final String WebSchemaPublicId_24 = >- "web-app_2_4.xsd"; >- public static final String WebSchemaResourcePath_24 = >- "/javax/servlet/resources/web-app_2_4.xsd"; >- >- public static final String WebSchemaPublicId_25 = >- "web-app_2_5.xsd"; >- public static final String WebSchemaResourcePath_25 = >- "/javax/servlet/resources/web-app_2_5.xsd"; >- >- public static final String WebSchemaPublicId_30 = >- "web-app_3_0.xsd"; >- public static final String WebSchemaResourcePath_30 = >- "/javax/servlet/resources/web-app_3_0.xsd"; >- >- public static final String WebCommonSchemaPublicId_30 = >- "web-common_3_0.xsd"; >- public static final String WebCommonSchemaResourcePath_30 = >- "/javax/servlet/resources/web-common_3_0.xsd"; >- >- public static final String WebFragmentSchemaPublicId_30 = >- "web-fragment_3_0.xsd"; >- public static final String WebFragmentSchemaResourcePath_30 = >- "/javax/servlet/resources/web-fragment_3_0.xsd"; >- >- public static final String WebSchemaPublicId_31 = >- "web-app_3_1.xsd"; >- public static final String WebSchemaResourcePath_31 = >- "/javax/servlet/resources/web-app_3_1.xsd"; >- >- public static final String WebCommonSchemaPublicId_31 = >- "web-common_3_1.xsd"; >- public static final String WebCommonSchemaResourcePath_31 = >- "/javax/servlet/resources/web-common_3_1.xsd"; >- >- public static final String WebFragmentSchemaPublicId_31 = >- "web-fragment_3_1.xsd"; >- public static final String WebFragmentSchemaResourcePath_31 = >- "/javax/servlet/resources/web-fragment_3_1.xsd"; >- >- >- // Web service >- public static final String J2eeWebServiceSchemaPublicId_11 = >- "j2ee_web_services_1_1.xsd"; >- public static final String J2eeWebServiceSchemaResourcePath_11 = >- "/javax/servlet/resources/j2ee_web_services_1_1.xsd"; >- >- public static final String J2eeWebServiceClientSchemaPublicId_11 = >- "j2ee_web_services_client_1_1.xsd"; >- public static final String J2eeWebServiceClientSchemaResourcePath_11 = >- "/javax/servlet/resources/j2ee_web_services_client_1_1.xsd"; >- >- public static final String JavaeeWebServiceSchemaPublicId_12 = >- "javaee_web_services_1_2.xsd"; >- public static final String JavaeeWebServiceSchemaResourcePath_12 = >- "/javax/servlet/resources/javaee_web_services_1_2.xsd"; >- >- public static final String JavaeeWebServiceClientSchemaPublicId_12 = >- "javaee_web_services_client_1_2.xsd"; >- public static final String JavaeeWebServiceClientSchemaResourcePath_12 = >- "/javax/servlet/resources/javaee_web_services_client_1_2.xsd"; >- >- public static final String JavaeeWebServiceSchemaPublicId_13 = >- "javaee_web_services_1_3.xsd"; >- public static final String JavaeeWebServiceSchemaResourcePath_13 = >- "/javax/servlet/resources/javaee_web_services_1_3.xsd"; >- >- public static final String JavaeeWebServiceClientSchemaPublicId_13 = >- "javaee_web_services_client_1_3.xsd"; >- public static final String JavaeeWebServiceClientSchemaResourcePath_13 = >- "/javax/servlet/resources/javaee_web_services_client_1_3.xsd"; >- >- public static final String JavaeeWebServiceSchemaPublicId_14 = >- "javaee_web_services_1_4.xsd"; >- public static final String JavaeeWebServiceSchemaResourcePath_14 = >- "/javax/servlet/resources/javaee_web_services_1_4.xsd"; >- >- public static final String JavaeeWebServiceClientSchemaPublicId_14 = >- "javaee_web_services_client_1_4.xsd"; >- public static final String JavaeeWebServiceClientSchemaResourcePath_14 = >- "/javax/servlet/resources/javaee_web_services_client_1_4.xsd"; > } >Index: java/org/apache/catalina/startup/DigesterFactory.java >=================================================================== >--- java/org/apache/catalina/startup/DigesterFactory.java (revision 1500552) >+++ java/org/apache/catalina/startup/DigesterFactory.java (working copy) >@@ -18,13 +18,13 @@ > > package org.apache.catalina.startup; > >-import java.net.URL; >+import java.util.HashMap; >+import java.util.Map; > >-import org.apache.catalina.util.SchemaResolver; >-import org.apache.juli.logging.Log; >-import org.apache.juli.logging.LogFactory; >+import org.apache.tomcat.XmlIdentifiers; > import org.apache.tomcat.util.digester.Digester; > import org.apache.tomcat.util.digester.RuleSet; >+import org.apache.tomcat.util.res.LocalResolver; > > /** > * Wrapper class around the Digester that hide Digester's initialization details >@@ -33,11 +33,51 @@ > */ > public class DigesterFactory { > /** >- * The log. >+ * A resolver for the resources packaged in servlet-api.jar > */ >- private static final Log log = LogFactory.getLog(DigesterFactory.class); >+ public static final LocalResolver SERVLET_RESOLVER; >+ static { >+ Map<String, String> publicIds = new HashMap<>(); >+ Map<String, String> systemIds = new HashMap<>(); > >+ // W3C >+ publicIds.put(XmlIdentifiers.XSD_10_DTD, urlFor("/javax/servlet/resources/XMLSchema.dtd")); >+ publicIds.put(XmlIdentifiers.DATATYPES_DTD, urlFor("/javax/servlet/resources/datatypes.dtd")); >+ systemIds.put(XmlIdentifiers.XML_2001_XSD, urlFor("/javax/servlet/resources/xml.xsd")); > >+ // from J2EE 1.2 >+ publicIds.put(XmlIdentifiers.WEB_22_DTD, urlFor("/javax/servlet/resources/web-app_2_2.dtd")); >+ publicIds.put(XmlIdentifiers.TLD_11_DTD, urlFor("/javax/servlet/resources/web-jsptaglibrary_1_1.dtd")); >+ >+ // from J2EE 1.3 >+ publicIds.put(XmlIdentifiers.WEB_23_DTD, urlFor("/javax/servlet/resources/web-app_2_3.dtd")); >+ publicIds.put(XmlIdentifiers.TLD_12_DTD, urlFor("/javax/servlet/resources/web-jsptaglibrary_1_2.dtd")); >+ >+ // from J2EE 1.4 >+ systemIds.put("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd", >+ urlFor("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd")); >+ systemIds.put(XmlIdentifiers.WEB_24_XSD, urlFor("/javax/servlet/resources/web-app_2_4.xsd")); >+ systemIds.put(XmlIdentifiers.TLD_20_XSD, urlFor("/javax/servlet/resources/web-jsptaglibrary_2_0.xsd")); >+ >+ // from JavaEE 5 >+ systemIds.put(XmlIdentifiers.WEB_25_XSD, urlFor("/javax/servlet/resources/web-app_2_5.xsd")); >+ systemIds.put(XmlIdentifiers.TLD_21_XSD, urlFor("/javax/servlet/resources/web-jsptaglibrary_2_1.xsd")); >+ >+ // from JavaEE 6 >+ systemIds.put(XmlIdentifiers.WEB_30_XSD, urlFor("/javax/servlet/resources/web-app_3_0.xsd")); >+ systemIds.put(XmlIdentifiers.WEB_FRAGMENT_30_XSD, urlFor("/javax/servlet/resources/web-fragment_3_0.xsd")); >+ >+ // from JavaEE 7 >+ systemIds.put(XmlIdentifiers.WEB_31_XSD, urlFor("/javax/servlet/resources/web-app_3_1.xsd")); >+ systemIds.put(XmlIdentifiers.WEB_FRAGMENT_31_XSD, urlFor("/javax/servlet/resources/web-fragment_3_1.xsd")); >+ >+ SERVLET_RESOLVER = new LocalResolver(publicIds, systemIds); >+ } >+ >+ private static String urlFor(String file) { >+ return DigesterFactory.class.getResource(file).toExternalForm(); >+ } >+ > /** > * Create a <code>Digester</code> parser. > * @param xmlValidation turn on/off xml validation >@@ -51,175 +91,11 @@ > digester.setNamespaceAware(xmlNamespaceAware); > digester.setValidating(xmlValidation); > digester.setUseContextClassLoader(true); >- >- SchemaResolver schemaResolver = new SchemaResolver(digester); >- registerLocalSchema(schemaResolver); >- >- digester.setEntityResolver(schemaResolver); >+ digester.setEntityResolver(SERVLET_RESOLVER); > if ( rule != null ) { > digester.addRuleSet(rule); > } > > return (digester); > } >- >- >- /** >- * Utilities used to force the parser to use local schema, when available, >- * instead of the <code>schemaLocation</code> XML element. >- */ >- protected static void registerLocalSchema(SchemaResolver schemaResolver){ >- // J2EE >- register(Constants.J2eeSchemaResourcePath_14, >- Constants.J2eeSchemaPublicId_14, >- schemaResolver); >- >- register(Constants.JavaeeSchemaResourcePath_5, >- Constants.JavaeeSchemaPublicId_5, >- schemaResolver); >- >- register(Constants.JavaeeSchemaResourcePath_6, >- Constants.JavaeeSchemaPublicId_6, >- schemaResolver); >- >- register(Constants.JavaeeSchemaResourcePath_7, >- Constants.JavaeeSchemaPublicId_7, >- schemaResolver); >- >- // W3C >- register(Constants.W3cSchemaResourcePath_10, >- Constants.W3cSchemaPublicId_10, >- schemaResolver); >- >- register(Constants.W3cSchemaDTDResourcePath_10, >- Constants.W3cSchemaDTDPublicId_10, >- schemaResolver); >- >- register(Constants.W3cDatatypesDTDResourcePath_10, >- Constants.W3cDatatypesDTDPublicId_10, >- schemaResolver); >- >- // JSP >- register(Constants.JspSchemaResourcePath_20, >- Constants.JspSchemaPublicId_20, >- schemaResolver); >- >- register(Constants.JspSchemaResourcePath_21, >- Constants.JspSchemaPublicId_21, >- schemaResolver); >- >- register(Constants.JspSchemaResourcePath_22, >- Constants.JspSchemaPublicId_22, >- schemaResolver); >- >- register(Constants.JspSchemaResourcePath_23, >- Constants.JspSchemaPublicId_23, >- schemaResolver); >- >- // TLD >- register(Constants.TldDtdResourcePath_11, >- Constants.TldDtdPublicId_11, >- schemaResolver); >- >- register(Constants.TldDtdResourcePath_12, >- Constants.TldDtdPublicId_12, >- schemaResolver); >- >- register(Constants.TldSchemaResourcePath_20, >- Constants.TldSchemaPublicId_20, >- schemaResolver); >- >- register(Constants.TldSchemaResourcePath_21, >- Constants.TldSchemaPublicId_21, >- schemaResolver); >- >- // web.xml >- register(Constants.WebDtdResourcePath_22, >- Constants.WebDtdPublicId_22, >- schemaResolver); >- >- register(Constants.WebDtdResourcePath_23, >- Constants.WebDtdPublicId_23, >- schemaResolver); >- >- register(Constants.WebSchemaResourcePath_24, >- Constants.WebSchemaPublicId_24, >- schemaResolver); >- >- register(Constants.WebSchemaResourcePath_25, >- Constants.WebSchemaPublicId_25, >- schemaResolver); >- >- register(Constants.WebSchemaResourcePath_30, >- Constants.WebSchemaPublicId_30, >- schemaResolver); >- >- register(Constants.WebCommonSchemaResourcePath_30, >- Constants.WebCommonSchemaPublicId_30, >- schemaResolver); >- >- register(Constants.WebFragmentSchemaResourcePath_30, >- Constants.WebFragmentSchemaPublicId_30, >- schemaResolver); >- >- register(Constants.WebSchemaResourcePath_31, >- Constants.WebSchemaPublicId_31, >- schemaResolver); >- >- register(Constants.WebCommonSchemaResourcePath_31, >- Constants.WebCommonSchemaPublicId_31, >- schemaResolver); >- >- register(Constants.WebFragmentSchemaResourcePath_31, >- Constants.WebFragmentSchemaPublicId_31, >- schemaResolver); >- >- // Web Service >- register(Constants.J2eeWebServiceSchemaResourcePath_11, >- Constants.J2eeWebServiceSchemaPublicId_11, >- schemaResolver); >- >- register(Constants.J2eeWebServiceClientSchemaResourcePath_11, >- Constants.J2eeWebServiceClientSchemaPublicId_11, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceSchemaResourcePath_12, >- Constants.JavaeeWebServiceSchemaPublicId_12, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceClientSchemaResourcePath_12, >- Constants.JavaeeWebServiceClientSchemaPublicId_12, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceSchemaResourcePath_13, >- Constants.JavaeeWebServiceSchemaPublicId_13, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceClientSchemaResourcePath_13, >- Constants.JavaeeWebServiceClientSchemaPublicId_13, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceSchemaResourcePath_14, >- Constants.JavaeeWebServiceSchemaPublicId_14, >- schemaResolver); >- >- register(Constants.JavaeeWebServiceClientSchemaResourcePath_14, >- Constants.JavaeeWebServiceClientSchemaPublicId_14, >- schemaResolver); >- } >- >- >- /** >- * Load the resource and add it to the resolver. >- */ >- protected static void register(String resourceURL, String resourcePublicId, >- SchemaResolver schemaResolver){ >- URL url = DigesterFactory.class.getResource(resourceURL); >- >- if(url == null) { >- log.warn("Could not get url for " + resourceURL); >- } else { >- schemaResolver.register(resourcePublicId , url.toString() ); >- } >- } > } >Index: java/org/apache/catalina/util/SchemaResolver.java >=================================================================== >--- java/org/apache/catalina/util/SchemaResolver.java (revision 1500552) >+++ java/org/apache/catalina/util/SchemaResolver.java (working copy) >@@ -1,128 +0,0 @@ >-/* >- * 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. >- */ >-package org.apache.catalina.util; >- >- >-import java.util.HashMap; >-import java.util.Map; >- >-import org.apache.tomcat.util.digester.Digester; >-import org.xml.sax.EntityResolver; >-import org.xml.sax.InputSource; >-import org.xml.sax.SAXException; >- >-/** >- * This class implements a local SAX's <code>EntityResolver</code>. All >- * DTDs and schemas used to validate the web.xml file will re-directed >- * to a local file stored in the servlet-api.jar and jsp-api.jar. >- * >- * @author Jean-Francois Arcand >- */ >-public class SchemaResolver implements EntityResolver { >- >- /** >- * The digester instance for which this class is the entity resolver. >- */ >- protected final Digester digester; >- >- >- /** >- * The URLs of dtds and schemas that have been registered, keyed by the >- * public identifier that corresponds. >- */ >- protected final Map<String,String> entityValidator = new HashMap<>(); >- >- >- /** >- * Extension to make the difference between DTD and Schema. >- */ >- protected final String schemaExtension = "xsd"; >- >- >- /** >- * Create a new <code>EntityResolver</code> that will redirect >- * all remote dtds and schema to a local destination. >- * @param digester The digester instance. >- */ >- public SchemaResolver(Digester digester) { >- this.digester = digester; >- } >- >- >- /** >- * Register the specified DTD/Schema URL for the specified public >- * identifier. This must be called before the first call to >- * <code>parse()</code>. >- * >- * When adding a schema file (*.xsd), only the name of the file >- * will get added. If two schemas with the same name are added, >- * only the last one will be stored. >- * >- * @param publicId Public identifier of the DTD to be resolved >- * @param entityURL The URL to use for reading this DTD >- */ >- public void register(String publicId, String entityURL) { >- String key = publicId; >- if (publicId.indexOf(schemaExtension) != -1) >- key = publicId.substring(publicId.lastIndexOf('/')+1); >- entityValidator.put(key, entityURL); >- } >- >- >- /** >- * Resolve the requested external entity. >- * >- * @param publicId The public identifier of the entity being referenced >- * @param systemId The system identifier of the entity being referenced >- * >- * @exception SAXException if a parsing exception occurs >- * >- */ >- @Override >- public InputSource resolveEntity(String publicId, String systemId) >- throws SAXException { >- >- if (publicId != null) { >- digester.setPublicId(publicId); >- } >- >- // Has this system identifier been registered? >- String entityURL = null; >- if (publicId != null) { >- entityURL = entityValidator.get(publicId); >- } >- >- // Redirect the schema location to a local destination >- String key = null; >- if (entityURL == null && systemId != null) { >- key = systemId.substring(systemId.lastIndexOf('/')+1); >- entityURL = entityValidator.get(key); >- } >- >- if (entityURL == null) { >- return (null); >- } >- >- try { >- return (new InputSource(entityURL)); >- } catch (Exception e) { >- throw new SAXException(e); >- } >- >- } >- >-} >Index: java/org/apache/jasper/Constants.java >=================================================================== >--- java/org/apache/jasper/Constants.java (revision 1500552) >+++ java/org/apache/jasper/Constants.java (working copy) >@@ -22,7 +22,9 @@ > import java.util.Collections; > import java.util.List; > >+import org.apache.tomcat.XmlIdentifiers; > >+ > /** > * Some constants and other global data that are used by the compiler and the runtime. > * >@@ -125,24 +127,24 @@ > * of the DTDs for tag library descriptors. > */ > private static final String TAGLIB_DTD_PUBLIC_ID_11 = >- "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"; >+ XmlIdentifiers.TLD_11_DTD; > private static final String TAGLIB_DTD_RESOURCE_PATH_11 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd"; >+ "/javax/servlet/resources/web-jsptaglibrary_1_1.dtd"; > private static final String TAGLIB_DTD_PUBLIC_ID_12 = >- "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"; >+ XmlIdentifiers.TLD_12_DTD; > private static final String TAGLIB_DTD_RESOURCE_PATH_12 = >- "/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd"; >+ "/javax/servlet/resources/web-jsptaglibrary_1_2.dtd"; > > /** > * Public Id and the Resource path (of the cached copy) > * of the DTDs for web application deployment descriptors > */ > private static final String WEBAPP_DTD_PUBLIC_ID_22 = >- "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; >+ XmlIdentifiers.WEB_22_DTD; > private static final String WEBAPP_DTD_RESOURCE_PATH_22 = > "/javax/servlet/resources/web-app_2_2.dtd"; > private static final String WEBAPP_DTD_PUBLIC_ID_23 = >- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"; >+ XmlIdentifiers.WEB_23_DTD; > private static final String WEBAPP_DTD_RESOURCE_PATH_23 = > "/javax/servlet/resources/web-app_2_3.dtd"; > >Index: java/org/apache/tomcat/XmlIdentifiers.java >=================================================================== >--- java/org/apache/tomcat/XmlIdentifiers.java (revision 0) >+++ java/org/apache/tomcat/XmlIdentifiers.java (working copy) >@@ -0,0 +1,55 @@ >+/* >+ * 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. >+ */ >+package org.apache.tomcat; >+ >+/** >+ * Defines constants for well-known Public and System identifiers. >+ */ >+public final class XmlIdentifiers { >+ >+ // from W3C >+ public static final String XML_2001_XSD = "http://www.w3.org/2001/xml.xsd"; >+ public static final String DATATYPES_DTD = "datatypes"; >+ public static final String XSD_10_DTD = "-//W3C//DTD XMLSCHEMA 200102//EN"; >+ >+ // from J2EE 1.2 >+ public static final String WEB_22_DTD = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; >+ public static final String TLD_11_DTD = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"; >+ >+ // from J2EE 1.3 >+ public static final String WEB_23_DTD = "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"; >+ public static final String TLD_12_DTD = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"; >+ >+ // from J2EE 1.4 >+ public static final String WEB_24_XSD = "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >+ public static final String TLD_20_XSD = "http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"; >+ >+ // from JavaEE 5 >+ public static final String WEB_25_XSD = "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; >+ public static final String TLD_21_XSD = "http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"; >+ >+ // from JavaEE 6 >+ public static final String WEB_30_XSD = "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; >+ public static final String WEB_FRAGMENT_30_XSD = "http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"; >+ >+ // from JavaEE 7 >+ public static final String WEB_31_XSD = "http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"; >+ public static final String WEB_FRAGMENT_31_XSD = "http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd"; >+ >+ private XmlIdentifiers() { >+ } >+} > >Property changes on: java/org/apache/tomcat/XmlIdentifiers.java >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: java/org/apache/tomcat/util/digester/Digester.java >=================================================================== >--- java/org/apache/tomcat/util/digester/Digester.java (revision 1500552) >+++ java/org/apache/tomcat/util/digester/Digester.java (working copy) >@@ -21,6 +21,8 @@ > import java.io.IOException; > import java.io.InputStream; > import java.lang.reflect.InvocationTargetException; >+import java.net.URI; >+import java.net.URISyntaxException; > import java.util.EmptyStackException; > import java.util.HashMap; > import java.util.Iterator; >@@ -45,8 +47,8 @@ > import org.xml.sax.SAXNotSupportedException; > import org.xml.sax.SAXParseException; > import org.xml.sax.XMLReader; >+import org.xml.sax.ext.DefaultHandler2; > import org.xml.sax.helpers.AttributesImpl; >-import org.xml.sax.helpers.DefaultHandler; > > > /** >@@ -68,7 +70,7 @@ > * the support of XML schema. You need Xerces 2.1/2.3 and up to make > * this class working with XML schema</p> > */ >-public class Digester extends DefaultHandler { >+public class Digester extends DefaultHandler2 { > > > // ---------------------------------------------------------- Static Fields >@@ -791,6 +793,8 @@ > reader.setEntityResolver(entityResolver); > } > >+ reader.setProperty("http://xml.org/sax/properties/lexical-handler", this); >+ > reader.setErrorHandler(this); > return reader; > } >@@ -1275,26 +1279,14 @@ > return entityResolver; > } > >- /** >- * Resolve the requested external entity. >- * >- * @param publicId The public identifier of the entity being referenced >- * @param systemId The system identifier of the entity being referenced >- * >- * @exception SAXException if a parsing exception occurs >- * >- */ > @Override >- public InputSource resolveEntity(String publicId, String systemId) >- throws SAXException { >+ public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) >+ throws SAXException, IOException { > > if (saxLog.isDebugEnabled()) { >- saxLog.debug("resolveEntity('" + publicId + "', '" + systemId + "')"); >+ saxLog.debug("resolveEntity('" + publicId + "', '" + systemId + "', '" + baseURI + "')"); > } > >- if (publicId != null) >- this.publicId = publicId; >- > // Has this system identifier been registered? > String entityURL = null; > if (publicId != null) { >@@ -1315,6 +1307,19 @@ > log.debug(" Trying to resolve using system ID '" + systemId + "'"); > } > entityURL = systemId; >+ // resolve systemId against baseURI if it is not absolute >+ if (baseURI != null) { >+ try { >+ URI uri = new URI(systemId); >+ if (!uri.isAbsolute()) { >+ entityURL = new URI(baseURI).resolve(uri).toString(); >+ } >+ } catch (URISyntaxException e) { >+ if (log.isDebugEnabled()) { >+ log.debug("Invalid URI '" + baseURI + "' or '" + systemId + "'"); >+ } >+ } >+ } > } > } > >@@ -1330,7 +1335,13 @@ > } > } > >+ // ----------------------------------------------- LexicalHandler Methods > >+ @Override >+ public void startDTD(String name, String publicId, String systemId) throws SAXException { >+ setPublicId(publicId); >+ } >+ > // ------------------------------------------------- ErrorHandler Methods > > >Index: java/org/apache/tomcat/util/res/LocalResolver.java >=================================================================== >--- java/org/apache/tomcat/util/res/LocalResolver.java (revision 0) >+++ java/org/apache/tomcat/util/res/LocalResolver.java (working copy) >@@ -0,0 +1,106 @@ >+/* >+ * 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. >+ */ >+package org.apache.tomcat.util.res; >+ >+import java.io.IOException; >+import java.net.URI; >+import java.net.URISyntaxException; >+import java.util.Map; >+ >+import org.xml.sax.InputSource; >+import org.xml.sax.SAXException; >+import org.xml.sax.ext.EntityResolver2; >+ >+/** >+ * A resolver for locally cached XML resources. >+ */ >+public class LocalResolver implements EntityResolver2 { >+ private final Map<String, String> publicIds; >+ private final Map<String, String> systemIds; >+ >+ /** >+ * Constructor providing mappings of public and system identifiers to local resources. >+ * >+ * @param publicIds mapping of public identifiers to local resources >+ * @param systemIds mapping of system identifiers to local resources >+ */ >+ public LocalResolver(Map<String, String> publicIds, Map<String, String> systemIds) { >+ this.publicIds = publicIds; >+ this.systemIds = systemIds; >+ } >+ >+ @Override >+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { >+ return resolveEntity(null, publicId, null, systemId); >+ } >+ >+ @Override >+ public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) >+ throws SAXException, IOException { >+ >+ String resolved = resolve(publicId, systemId, baseURI); >+ if (resolved == null) { >+ return null; >+ } >+ >+ InputSource is = new InputSource(resolved); >+ is.setPublicId(publicId); >+ return is; >+ } >+ >+ @Override >+ public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException { >+ return null; >+ } >+ >+ private String resolve(String publicId, String systemId, String baseURI) { >+ // try resolving using the publicId >+ String resolved = publicIds.get(publicId); >+ if (resolved != null) { >+ return resolved; >+ } >+ >+ // try resolving using the systemId >+ if (systemId == null) { >+ return null; >+ } >+ >+ systemId = resolve(baseURI, systemId); >+ resolved = systemIds.get(systemId); >+ if (resolved != null) { >+ return resolved; >+ } >+ >+ // fall back to the supplied systemId >+ return systemId; >+ } >+ >+ private static String resolve(String baseURI, String systemId) { >+ try { >+ if (baseURI == null) { >+ return systemId; >+ } >+ URI systemUri = new URI(systemId); >+ if (systemUri.isAbsolute()) { >+ return systemId; >+ } >+ return new URI(baseURI).resolve(systemUri).toString(); >+ } catch (URISyntaxException e) { >+ return systemId; >+ } >+ } >+} > >Property changes on: java/org/apache/tomcat/util/res/LocalResolver.java >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: test/javax/servlet/TestSchemaValidation.java >=================================================================== >--- test/javax/servlet/TestSchemaValidation.java (revision 0) >+++ test/javax/servlet/TestSchemaValidation.java (working copy) >@@ -0,0 +1,88 @@ >+/* >+ * 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. >+ */ >+package javax.servlet; >+ >+import java.io.File; >+ >+import org.apache.catalina.deploy.WebXml; >+import org.apache.catalina.startup.DigesterFactory; >+import org.apache.catalina.startup.WebRuleSet; >+import org.apache.tomcat.XmlIdentifiers; >+import org.apache.tomcat.util.digester.Digester; >+import org.junit.Assert; >+import org.junit.Test; >+ >+public class TestSchemaValidation { >+ >+ @Test >+ public void testWebapp() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp/WEB-INF/web.xml")); >+ Assert.assertEquals("3.1", desc.getVersion()); >+ } >+ >+ @Test >+ public void testWebapp_2_2() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-2.2/WEB-INF/web.xml")); >+ Assert.assertEquals("2.2", desc.getVersion()); >+ Assert.assertEquals(XmlIdentifiers.WEB_22_DTD, desc.getPublicId()); >+ } >+ >+ @Test >+ public void testWebapp_2_3() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-2.3/WEB-INF/web.xml")); >+ Assert.assertEquals("2.3", desc.getVersion()); >+ Assert.assertEquals(XmlIdentifiers.WEB_23_DTD, desc.getPublicId()); >+ } >+ >+ @Test >+ public void testWebapp_2_4() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-2.4/WEB-INF/web.xml")); >+ Assert.assertEquals("2.4", desc.getVersion()); >+ } >+ >+ @Test >+ public void testWebapp_2_5() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-2.5/WEB-INF/web.xml")); >+ Assert.assertEquals("2.5", desc.getVersion()); >+ } >+ >+ @Test >+ public void testWebapp_3_0() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-3.0/WEB-INF/web.xml")); >+ Assert.assertEquals("3.0", desc.getVersion()); >+ } >+ >+ @Test >+ public void testWebapp_3_1() throws Exception { >+ Digester digester = DigesterFactory.newDigester(true, true, new WebRuleSet(false)); >+ digester.push(new WebXml()); >+ WebXml desc = (WebXml) digester.parse(new File("test/webapp-3.1/WEB-INF/web.xml")); >+ Assert.assertEquals("3.1", desc.getVersion()); >+ } >+} > >Property changes on: test/javax/servlet/TestSchemaValidation.java >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: test/org/apache/catalina/deploy/TestWebXml.java >=================================================================== >--- test/org/apache/catalina/deploy/TestWebXml.java (revision 1500552) >+++ test/org/apache/catalina/deploy/TestWebXml.java (working copy) >@@ -21,6 +21,7 @@ > import java.util.Map; > import java.util.Set; > >+import org.apache.tomcat.XmlIdentifiers; > import org.junit.Assert; > import org.junit.Test; > >@@ -43,38 +44,15 @@ > Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(5, webxml.getMinorVersion()); > >- // Reset >+ // unknown input should be ignored > webxml.setVersion("0.0"); >- Assert.assertEquals(0, webxml.getMajorVersion()); >- Assert.assertEquals(0, webxml.getMinorVersion()); >+ Assert.assertEquals(2, webxml.getMajorVersion()); >+ Assert.assertEquals(5, webxml.getMinorVersion()); > > // null input should be ignored > webxml.setVersion(null); >- Assert.assertEquals(0, webxml.getMajorVersion()); >- Assert.assertEquals(0, webxml.getMinorVersion()); >- >- // major only >- webxml.setVersion("3"); >- Assert.assertEquals(3, webxml.getMajorVersion()); >- Assert.assertEquals(0, webxml.getMinorVersion()); >- >- // no minor digit >- webxml.setVersion("0.0"); // reset >- webxml.setVersion("3."); >- Assert.assertEquals(3, webxml.getMajorVersion()); >- Assert.assertEquals(0, webxml.getMinorVersion()); >- >- // minor only >- webxml.setVersion("0.0"); // reset >- webxml.setVersion(".5"); >- Assert.assertEquals(0, webxml.getMajorVersion()); >+ Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(5, webxml.getMinorVersion()); >- >- // leading & training zeros >- webxml.setVersion("0.0"); // reset >- webxml.setVersion("002.500"); >- Assert.assertEquals(2, webxml.getMajorVersion()); >- Assert.assertEquals(500, webxml.getMinorVersion()); > } > > @Test >@@ -82,8 +60,7 @@ > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebDtdPublicId_22); >+ webxml.setPublicId(XmlIdentifiers.WEB_22_DTD); > Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(2, webxml.getMinorVersion()); > Assert.assertEquals("2.2", webxml.getVersion()); >@@ -94,56 +71,51 @@ > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebDtdPublicId_23); >+ webxml.setPublicId(XmlIdentifiers.WEB_23_DTD); > Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(3, webxml.getMinorVersion()); > Assert.assertEquals("2.3", webxml.getVersion()); > } > > @Test >- public void testParsePublicIdVersion24() { >+ public void testParseVersion24() { > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebSchemaPublicId_24); >+ webxml.setVersion("2.4"); > Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(4, webxml.getMinorVersion()); > Assert.assertEquals("2.4", webxml.getVersion()); > } > > @Test >- public void testParsePublicIdVersion25() { >+ public void testParseVersion25() { > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebSchemaPublicId_25); >+ webxml.setVersion("2.5"); > Assert.assertEquals(2, webxml.getMajorVersion()); > Assert.assertEquals(5, webxml.getMinorVersion()); > Assert.assertEquals("2.5", webxml.getVersion()); > } > > @Test >- public void testParsePublicIdVersion30() { >+ public void testParseVersion30() { > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebSchemaPublicId_30); >+ webxml.setVersion("3.0"); > Assert.assertEquals(3, webxml.getMajorVersion()); > Assert.assertEquals(0, webxml.getMinorVersion()); > Assert.assertEquals("3.0", webxml.getVersion()); > } > > @Test >- public void testParsePublicIdVersion31() { >+ public void testParseVersion31() { > > WebXml webxml = new WebXml(); > >- webxml.setPublicId( >- org.apache.catalina.startup.Constants.WebSchemaPublicId_31); >+ webxml.setVersion("3.1"); > Assert.assertEquals(3, webxml.getMajorVersion()); > Assert.assertEquals(1, webxml.getMinorVersion()); > Assert.assertEquals("3.1", webxml.getVersion()); >Index: test/org/apache/jasper/compiler/TestJspConfig.java >=================================================================== >--- test/org/apache/jasper/compiler/TestJspConfig.java (revision 1500552) >+++ test/org/apache/jasper/compiler/TestJspConfig.java (working copy) >@@ -30,6 +30,26 @@ > public class TestJspConfig extends TomcatBaseTest { > > @Test >+ public void testServlet22NoEL() throws Exception { >+ Tomcat tomcat = getTomcatInstance(); >+ >+ File appDir = >+ new File("test/webapp-2.2"); >+ // app dir is relative to server home >+ tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); >+ >+ tomcat.start(); >+ >+ ByteChunk res = getUrl("http://localhost:" + getPort() + >+ "/test/el-as-literal.jsp"); >+ >+ String result = res.toString(); >+ >+ assertTrue(result.indexOf("<p>00-${'hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>01-#{'hello world'}</p>") > 0); >+ } >+ >+ @Test > public void testServlet23NoEL() throws Exception { > Tomcat tomcat = getTomcatInstance(); > >Index: test/org/apache/jasper/compiler/TestValidator.java >=================================================================== >--- test/org/apache/jasper/compiler/TestValidator.java (revision 1500552) >+++ test/org/apache/jasper/compiler/TestValidator.java (working copy) >@@ -53,6 +53,31 @@ > } > > @Test >+ public void testTldVersions22() throws Exception { >+ Tomcat tomcat = getTomcatInstance(); >+ >+ File appDir = >+ new File("test/webapp-2.2"); >+ // app dir is relative to server home >+ tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); >+ >+ tomcat.start(); >+ >+ ByteChunk res = getUrl("http://localhost:" + getPort() + >+ "/test/tld-versions.jsp"); >+ >+ String result = res.toString(); >+ >+ assertTrue(result.indexOf("<p>${'00-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>#{'01-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>${'02-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>#{'03-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>${'04-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>#{'05-hello world'}</p>") > 0); >+ assertTrue(result.indexOf("<p>${'06-hello world'}</p>") > 0); >+ } >+ >+ @Test > public void testTldVersions23() throws Exception { > Tomcat tomcat = getTomcatInstance(); > >Index: test/webapp-2.2/WEB-INF/tags12.tld >=================================================================== >--- test/webapp-2.2/WEB-INF/tags12.tld (working copy) >+++ test/webapp-2.2/WEB-INF/tags12.tld (working copy) >@@ -25,7 +25,7 @@ > > <tag> > <name>Echo</name> >- <tagclass>org.apache.jasper.compiler.TestValidator$Echo</tagclass> >+ <tag-class>org.apache.jasper.compiler.TestValidator$Echo</tag-class> > <body-content>empty</body-content> > <attribute> > <name>echo</name> >Index: test/webapp-2.2/WEB-INF/tags20.tld >=================================================================== >--- test/webapp-2.2/WEB-INF/tags20.tld (working copy) >+++ test/webapp-2.2/WEB-INF/tags20.tld (working copy) >@@ -14,10 +14,10 @@ > 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. >---><taglib xmlns="http://java.sun.com/xml/ns/javaee" >+--><taglib xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >- http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_0.xsd" >+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >+ http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" > version="2.0"> > <tlib-version>1.0</tlib-version> > <short-name>Tags20</short-name> >@@ -25,7 +25,7 @@ > > <tag> > <name>Echo</name> >- <tagclass>org.apache.jasper.compiler.TestValidator$Echo</tagclass> >+ <tag-class>org.apache.jasper.compiler.TestValidator$Echo</tag-class> > <body-content>empty</body-content> > <attribute> > <name>echo</name> >Index: test/webapp-2.2/WEB-INF/tags21.tld >=================================================================== >--- test/webapp-2.2/WEB-INF/tags21.tld (working copy) >+++ test/webapp-2.2/WEB-INF/tags21.tld (working copy) >@@ -25,7 +25,7 @@ > > <tag> > <name>Echo</name> >- <tagclass>org.apache.jasper.compiler.TestValidator$Echo</tagclass> >+ <tag-class>org.apache.jasper.compiler.TestValidator$Echo</tag-class> > <body-content>empty</body-content> > <attribute> > <name>echo</name> >Index: test/webapp-2.2/WEB-INF/web.xml >=================================================================== >--- test/webapp-2.2/WEB-INF/web.xml (working copy) >+++ test/webapp-2.2/WEB-INF/web.xml (working copy) >@@ -16,15 +16,15 @@ > limitations under the License. > --> > <!DOCTYPE web-app PUBLIC >- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >- "http://java.sun.com/dtd/web-app_2_3.dtd"> >+ "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" >+ "http://java.sun.com/dtd/web-app_2_2.dtd"> > <web-app> >- <display-name>Tomcat Servlet 2.3 Tests</display-name> >+ <display-name>Tomcat Servlet 2.2 Tests</display-name> > <description> > Provides a web application used by the Tomcat unit tests to ensure that > Tomcat meets the requirements of the current JSP and Servlet specification >- for web applications that declare that they follow version 2.3 of the >- Servlet specification and version 1.2 of the JSP specification. This >+ for web applications that declare that they follow version 2.2 of the >+ Servlet specification and version 1.1 of the JSP specification. This > typically means ensuring that features introduced in later versions of the > specification do not change the behaviour of applications that declared an > earlier version of the specification.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55166
:
30508
|
30526
|
30527
|
30528
|
30556
| 30567