Skip to content

Commit f599ac7

Browse files
committed
Add Jakarta EE 11 schema to the digester
1 parent 236e403 commit f599ac7

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

java/org/apache/tomcat/util/descriptor/DigesterFactory.java

+8
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ public class DigesterFactory {
145145
addSelf(systemIds, "jakartaee_web_services_2_0.xsd");
146146
addSelf(systemIds, "jakartaee_web_services_client_2_0.xsd");
147147

148+
// from JakartaEE 11
149+
add(systemIds, XmlIdentifiers.WEB_61_XSD, locationFor("web-app_6_1.xsd"));
150+
add(systemIds, XmlIdentifiers.WEB_FRAGMENT_61_XSD, locationFor("web-fragment_6_1.xsd"));
151+
add(systemIds, XmlIdentifiers.TLD_40_XSD, locationFor("web-jsptaglibrary_4_0.xsd"));
152+
addSelf(systemIds, "web-common_6_1.xsd");
153+
addSelf(systemIds, "jakartaee_11.xsd");
154+
addSelf(systemIds, "jsp_4_0.xsd");
155+
148156
SERVLET_API_PUBLIC_IDS = Collections.unmodifiableMap(publicIds);
149157
SERVLET_API_SYSTEM_IDS = Collections.unmodifiableMap(systemIds);
150158
}

java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ public final class XmlIdentifiers {
9191
public static final String WEB_FRAGMENT_60_XSD = JAKARTAEE_10_NS + "/web-fragment_6_0.xsd";
9292
public static final String TLD_31_XSD = JAKARTAEE_10_NS + "/web-jsptaglibrary_3_1.xsd";
9393

94+
// from Jakarta EE 11
95+
public static final String JAKARTAEE_11_NS = JAKARTAEE_10_NS;
96+
public static final String WEB_61_XSD = JAKARTAEE_11_NS + "/web-app_6_1.xsd";
97+
public static final String WEB_FRAGMENT_61_XSD = JAKARTAEE_11_NS + "/web-fragment_6_1.xsd";
98+
public static final String TLD_40_XSD = JAKARTAEE_11_NS + "/web-jsptaglibrary_4_0.xsd";
99+
94100
private XmlIdentifiers() {
95101
}
96102
}

java/org/apache/tomcat/util/descriptor/web/WebXml.java

+3
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,9 @@ public String toXml() {
766766
} else if ("6.0".equals(version)) {
767767
javaeeNamespace = XmlIdentifiers.JAKARTAEE_10_NS;
768768
webXmlSchemaLocation = XmlIdentifiers.WEB_60_XSD;
769+
} else if ("6.1".equals(version)) {
770+
javaeeNamespace = XmlIdentifiers.JAKARTAEE_11_NS;
771+
webXmlSchemaLocation = XmlIdentifiers.WEB_61_XSD;
769772
}
770773
sb.append("<web-app xmlns=\"");
771774
sb.append(javaeeNamespace);

0 commit comments

Comments
 (0)