1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4    Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
5
6    This program and the accompanying materials are made available under the
7    terms of the Eclipse Public License v. 2.0, which is available at
8    http://www.eclipse.org/legal/epl-2.0.
9
10    This Source Code may also be made available under the following Secondary
11    Licenses when the conditions for such availability set forth in the
12    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
13    version 2 with the GNU Classpath Exception, which is available at
14    https://www.gnu.org/software/classpath/license.html.
15
16    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
18-->
19
20<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
21            targetNamespace="http://xmlns.jcp.org/xml/ns/javaee"
22            xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
23            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
24            elementFormDefault="qualified"
25            attributeFormDefault="unqualified"
26            version="3.1">
27
28  <xsd:annotation>
29    <xsd:documentation>
30      <![CDATA[
31      This is the common XML Schema for the Servlet 3.1 deployment descriptor.
32      This file is in turn used by web.xml and web-fragment.xml
33      web application's war file.  All Servlet deployment descriptors
34      must indicate the web common schema by using the Java EE
35      namespace:
36
37      http://xmlns.jcp.org/xml/ns/javaee
38
39      and by indicating the version of the schema by
40      using the version element as shown below:
41
42      <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
43      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44      xsi:schemaLocation="..."
45      version="3.1">
46      ...
47      </web-app>
48
49      The instance documents may indicate the published version of
50      the schema using the xsi:schemaLocation attribute for Java EE
51      namespace with the following location:
52
53      http://xmlns.jcp.org/xml/ns/javaee/web-common_3_1.xsd
54
55      ]]>
56    </xsd:documentation>
57  </xsd:annotation>
58
59  <xsd:annotation>
60    <xsd:documentation>
61
62      The following conventions apply to all Java EE
63      deployment descriptor elements unless indicated otherwise.
64
65      - In elements that specify a pathname to a file within the
66      same JAR file, relative filenames (i.e., those not
67      starting with "/") are considered relative to the root of
68      the JAR file's namespace.  Absolute filenames (i.e., those
69      starting with "/") also specify names in the root of the
70      JAR file's namespace.  In general, relative names are
71      preferred.  The exception is .war files where absolute
72      names are preferred for consistency with the Servlet API.
73
74    </xsd:documentation>
75  </xsd:annotation>
76
77  <xsd:include schemaLocation="javaee_7.xsd"/>
78
79  <xsd:include schemaLocation="jsp_2_3.xsd"/>
80
81  <xsd:group name="web-commonType">
82    <xsd:choice>
83      <xsd:group ref="javaee:descriptionGroup"/>
84      <xsd:element name="distributable"
85                   type="javaee:emptyType"/>
86      <xsd:element name="context-param"
87                   type="javaee:param-valueType">
88        <xsd:annotation>
89          <xsd:documentation>
90
91            The context-param element contains the declaration
92            of a web application's servlet context
93            initialization parameters.
94
95          </xsd:documentation>
96        </xsd:annotation>
97      </xsd:element>
98      <xsd:element name="filter"
99                   type="javaee:filterType"/>
100      <xsd:element name="filter-mapping"
101                   type="javaee:filter-mappingType"/>
102      <xsd:element name="listener"
103                   type="javaee:listenerType"/>
104      <xsd:element name="servlet"
105                   type="javaee:servletType"/>
106      <xsd:element name="servlet-mapping"
107                   type="javaee:servlet-mappingType"/>
108      <xsd:element name="session-config"
109                   type="javaee:session-configType"/>
110      <xsd:element name="mime-mapping"
111                   type="javaee:mime-mappingType"/>
112      <xsd:element name="welcome-file-list"
113                   type="javaee:welcome-file-listType"/>
114      <xsd:element name="error-page"
115                   type="javaee:error-pageType"/>
116      <xsd:element name="jsp-config"
117                   type="javaee:jsp-configType"/>
118      <xsd:element name="security-constraint"
119                   type="javaee:security-constraintType"/>
120      <xsd:element name="login-config"
121                   type="javaee:login-configType"/>
122      <xsd:element name="security-role"
123                   type="javaee:security-roleType"/>
124      <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
125      <xsd:element name="message-destination"
126                   type="javaee:message-destinationType"/>
127      <xsd:element name="locale-encoding-mapping-list"
128                   type="javaee:locale-encoding-mapping-listType"/>
129    </xsd:choice>
130  </xsd:group>
131
132  <xsd:attributeGroup name="web-common-attributes">
133    <xsd:attribute name="version"
134                   type="javaee:web-app-versionType"
135                   use="required"/>
136    <xsd:attribute name="id"
137                   type="xsd:ID"/>
138    <xsd:attribute name="metadata-complete"
139                   type="xsd:boolean">
140      <xsd:annotation>
141        <xsd:documentation>
142
143          The metadata-complete attribute defines whether this
144          deployment descriptor and other related deployment
145          descriptors for this module (e.g., web service
146          descriptors) are complete, or whether the class
147          files available to this module and packaged with
148          this application should be examined for annotations
149          that specify deployment information.
150
151          If metadata-complete is set to "true", the deployment
152          tool must ignore any annotations that specify deployment
153          information, which might be present in the class files
154          of the application.
155
156          If metadata-complete is not specified or is set to
157          "false", the deployment tool must examine the class
158          files of the application for annotations, as
159          specified by the specifications.
160
161        </xsd:documentation>
162      </xsd:annotation>
163    </xsd:attribute>
164  </xsd:attributeGroup>
165
166
167<!-- **************************************************** -->
168
169  <xsd:complexType name="auth-constraintType">
170    <xsd:annotation>
171      <xsd:documentation>
172
173        The auth-constraintType indicates the user roles that
174        should be permitted access to this resource
175        collection. The role-name used here must either correspond
176        to the role-name of one of the security-role elements
177        defined for this web application, or be the specially
178        reserved role-name "*" that is a compact syntax for
179        indicating all roles in the web application. If both "*"
180        and rolenames appear, the container interprets this as all
181        roles.  If no roles are defined, no user is allowed access
182        to the portion of the web application described by the
183        containing security-constraint.  The container matches
184        role names case sensitively when determining access.
185
186      </xsd:documentation>
187    </xsd:annotation>
188    <xsd:sequence>
189      <xsd:element name="description"
190                   type="javaee:descriptionType"
191                   minOccurs="0"
192                   maxOccurs="unbounded"/>
193      <xsd:element name="role-name"
194                   type="javaee:role-nameType"
195                   minOccurs="0"
196                   maxOccurs="unbounded"/>
197    </xsd:sequence>
198    <xsd:attribute name="id"
199                   type="xsd:ID"/>
200  </xsd:complexType>
201
202
203<!-- **************************************************** -->
204
205  <xsd:complexType name="auth-methodType">
206    <xsd:annotation>
207      <xsd:documentation>
208
209        The auth-methodType is used to configure the authentication
210        mechanism for the web application. As a prerequisite to
211        gaining access to any web resources which are protected by
212        an authorization constraint, a user must have authenticated
213        using the configured mechanism. Legal values are "BASIC",
214        "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific
215        authentication scheme.
216
217        Used in: login-config
218
219      </xsd:documentation>
220    </xsd:annotation>
221    <xsd:simpleContent>
222      <xsd:restriction base="javaee:string"/>
223    </xsd:simpleContent>
224  </xsd:complexType>
225
226
227<!-- **************************************************** -->
228
229  <xsd:complexType name="dispatcherType">
230    <xsd:annotation>
231      <xsd:documentation>
232
233        The dispatcher has five legal values: FORWARD, REQUEST,
234        INCLUDE, ASYNC, and ERROR.
235
236        A value of FORWARD means the Filter will be applied under
237        RequestDispatcher.forward() calls.
238        A value of REQUEST means the Filter will be applied under
239        ordinary client calls to the path or servlet.
240        A value of INCLUDE means the Filter will be applied under
241        RequestDispatcher.include() calls.
242        A value of ASYNC means the Filter will be applied under
243        calls dispatched from an AsyncContext.
244        A value of ERROR means the Filter will be applied under the
245        error page mechanism.
246
247        The absence of any dispatcher elements in a filter-mapping
248        indicates a default of applying filters only under ordinary
249        client calls to the path or servlet.
250
251      </xsd:documentation>
252    </xsd:annotation>
253    <xsd:simpleContent>
254      <xsd:restriction base="javaee:string">
255        <xsd:enumeration value="FORWARD"/>
256        <xsd:enumeration value="INCLUDE"/>
257        <xsd:enumeration value="REQUEST"/>
258        <xsd:enumeration value="ASYNC"/>
259        <xsd:enumeration value="ERROR"/>
260      </xsd:restriction>
261    </xsd:simpleContent>
262  </xsd:complexType>
263
264
265<!-- **************************************************** -->
266
267  <xsd:complexType name="error-codeType">
268    <xsd:annotation>
269      <xsd:documentation>
270
271        The error-code contains an HTTP error code, ex: 404
272
273        Used in: error-page
274
275      </xsd:documentation>
276    </xsd:annotation>
277    <xsd:simpleContent>
278      <xsd:restriction base="javaee:xsdPositiveIntegerType">
279        <xsd:pattern value="\d{3}"/>
280        <xsd:attribute name="id"
281                       type="xsd:ID"/>
282      </xsd:restriction>
283    </xsd:simpleContent>
284  </xsd:complexType>
285
286
287<!-- **************************************************** -->
288
289  <xsd:complexType name="error-pageType">
290    <xsd:annotation>
291      <xsd:documentation>
292
293        The error-pageType contains a mapping between an error code
294        or exception type to the path of a resource in the web
295        application.
296
297        Error-page declarations using the exception-type element in
298        the deployment descriptor must be unique up to the class name of
299        the exception-type. Similarly, error-page declarations using the
300        error-code element must be unique in the deployment descriptor
301        up to the status code.
302
303        If an error-page element in the deployment descriptor does not
304        contain an exception-type or an error-code element, the error
305        page is a default error page.
306
307        Used in: web-app
308
309      </xsd:documentation>
310    </xsd:annotation>
311    <xsd:sequence>
312      <xsd:choice minOccurs="0"
313                  maxOccurs="1">
314        <xsd:element name="error-code"
315                     type="javaee:error-codeType"/>
316        <xsd:element name="exception-type"
317                     type="javaee:fully-qualified-classType">
318          <xsd:annotation>
319            <xsd:documentation>
320
321              The exception-type contains a fully qualified class
322              name of a Java exception type.
323
324            </xsd:documentation>
325          </xsd:annotation>
326        </xsd:element>
327      </xsd:choice>
328      <xsd:element name="location"
329                   type="javaee:war-pathType">
330        <xsd:annotation>
331          <xsd:documentation>
332
333            The location element contains the location of the
334            resource in the web application relative to the root of
335            the web application. The value of the location must have
336            a leading `/'.
337
338          </xsd:documentation>
339        </xsd:annotation>
340      </xsd:element>
341    </xsd:sequence>
342    <xsd:attribute name="id"
343                   type="xsd:ID"/>
344  </xsd:complexType>
345
346
347<!-- **************************************************** -->
348
349  <xsd:complexType name="filterType">
350    <xsd:annotation>
351      <xsd:documentation>
352
353        The filterType is used to declare a filter in the web
354        application. The filter is mapped to either a servlet or a
355        URL pattern in the filter-mapping element, using the
356        filter-name value to reference. Filters can access the
357        initialization parameters declared in the deployment
358        descriptor at runtime via the FilterConfig interface.
359
360        Used in: web-app
361
362      </xsd:documentation>
363    </xsd:annotation>
364    <xsd:sequence>
365      <xsd:group ref="javaee:descriptionGroup"/>
366      <xsd:element name="filter-name"
367                   type="javaee:filter-nameType"/>
368      <xsd:element name="filter-class"
369                   type="javaee:fully-qualified-classType"
370                   minOccurs="0"
371                   maxOccurs="1">
372        <xsd:annotation>
373          <xsd:documentation>
374
375            The fully qualified classname of the filter.
376
377          </xsd:documentation>
378        </xsd:annotation>
379      </xsd:element>
380      <xsd:element name="async-supported"
381                   type="javaee:true-falseType"
382                   minOccurs="0"/>
383      <xsd:element name="init-param"
384                   type="javaee:param-valueType"
385                   minOccurs="0"
386                   maxOccurs="unbounded">
387        <xsd:annotation>
388          <xsd:documentation>
389
390            The init-param element contains a name/value pair as
391            an initialization param of a servlet filter
392
393          </xsd:documentation>
394        </xsd:annotation>
395      </xsd:element>
396    </xsd:sequence>
397    <xsd:attribute name="id"
398                   type="xsd:ID"/>
399  </xsd:complexType>
400
401
402<!-- **************************************************** -->
403
404  <xsd:complexType name="filter-mappingType">
405    <xsd:annotation>
406      <xsd:documentation>
407
408        Declaration of the filter mappings in this web
409        application is done by using filter-mappingType.
410        The container uses the filter-mapping
411        declarations to decide which filters to apply to a request,
412        and in what order. The container matches the request URI to
413        a Servlet in the normal way. To determine which filters to
414        apply it matches filter-mapping declarations either on
415        servlet-name, or on url-pattern for each filter-mapping
416        element, depending on which style is used. The order in
417        which filters are invoked is the order in which
418        filter-mapping declarations that match a request URI for a
419        servlet appear in the list of filter-mapping elements.The
420        filter-name value must be the value of the filter-name
421        sub-elements of one of the filter declarations in the
422        deployment descriptor.
423
424      </xsd:documentation>
425    </xsd:annotation>
426    <xsd:sequence>
427      <xsd:element name="filter-name"
428                   type="javaee:filter-nameType"/>
429      <xsd:choice minOccurs="1"
430                  maxOccurs="unbounded">
431        <xsd:element name="url-pattern"
432                     type="javaee:url-patternType"/>
433        <xsd:element name="servlet-name"
434                     type="javaee:servlet-nameType"/>
435      </xsd:choice>
436      <xsd:element name="dispatcher"
437                   type="javaee:dispatcherType"
438                   minOccurs="0"
439                   maxOccurs="5"/>
440    </xsd:sequence>
441    <xsd:attribute name="id"
442                   type="xsd:ID"/>
443  </xsd:complexType>
444
445
446<!-- **************************************************** -->
447
448  <xsd:complexType name="nonEmptyStringType">
449    <xsd:annotation>
450      <xsd:documentation>
451
452        This type defines a string which contains at least one
453        character.
454
455      </xsd:documentation>
456    </xsd:annotation>
457    <xsd:simpleContent>
458      <xsd:restriction base="javaee:string">
459        <xsd:minLength value="1"/>
460      </xsd:restriction>
461    </xsd:simpleContent>
462  </xsd:complexType>
463
464
465<!-- **************************************************** -->
466
467  <xsd:complexType name="filter-nameType">
468    <xsd:annotation>
469      <xsd:documentation>
470
471        The logical name of the filter is declare
472        by using filter-nameType. This name is used to map the
473        filter.  Each filter name is unique within the web
474        application.
475
476        Used in: filter, filter-mapping
477
478      </xsd:documentation>
479    </xsd:annotation>
480    <xsd:simpleContent>
481      <xsd:extension base="javaee:nonEmptyStringType"/>
482    </xsd:simpleContent>
483  </xsd:complexType>
484
485
486<!-- **************************************************** -->
487
488  <xsd:complexType name="form-login-configType">
489    <xsd:annotation>
490      <xsd:documentation>
491
492        The form-login-configType specifies the login and error
493        pages that should be used in form based login. If form based
494        authentication is not used, these elements are ignored.
495
496        Used in: login-config
497
498      </xsd:documentation>
499    </xsd:annotation>
500    <xsd:sequence>
501      <xsd:element name="form-login-page"
502                   type="javaee:war-pathType">
503        <xsd:annotation>
504          <xsd:documentation>
505
506            The form-login-page element defines the location in the web
507            app where the page that can be used for login can be
508            found.  The path begins with a leading / and is interpreted
509            relative to the root of the WAR.
510
511          </xsd:documentation>
512        </xsd:annotation>
513      </xsd:element>
514      <xsd:element name="form-error-page"
515                   type="javaee:war-pathType">
516        <xsd:annotation>
517          <xsd:documentation>
518
519            The form-error-page element defines the location in
520            the web app where the error page that is displayed
521            when login is not successful can be found.
522            The path begins with a leading / and is interpreted
523            relative to the root of the WAR.
524
525          </xsd:documentation>
526        </xsd:annotation>
527      </xsd:element>
528    </xsd:sequence>
529    <xsd:attribute name="id"
530                   type="xsd:ID"/>
531  </xsd:complexType>
532
533  <xsd:simpleType name="http-methodType">
534    <xsd:annotation>
535      <xsd:documentation>
536
537        A HTTP method type as defined in HTTP 1.1 section 2.2.
538
539      </xsd:documentation>
540    </xsd:annotation>
541    <xsd:restriction base="xsd:token">
542      <xsd:pattern value="[!-~-[\(\)&#60;&#62;@,;:&#34;/\[\]?=\{\}\\\p{Z}]]+"/>
543    </xsd:restriction>
544  </xsd:simpleType>
545
546  <xsd:simpleType name="load-on-startupType">
547    <xsd:union memberTypes="javaee:null-charType xsd:integer"/>
548  </xsd:simpleType>
549
550  <xsd:simpleType name="null-charType">
551    <xsd:restriction base="xsd:string">
552      <xsd:enumeration value=""/>
553    </xsd:restriction>
554  </xsd:simpleType>
555
556
557<!-- **************************************************** -->
558
559  <xsd:complexType name="login-configType">
560    <xsd:annotation>
561      <xsd:documentation>
562
563        The login-configType is used to configure the authentication
564        method that should be used, the realm name that should be
565        used for this application, and the attributes that are
566        needed by the form login mechanism.
567
568        Used in: web-app
569
570      </xsd:documentation>
571    </xsd:annotation>
572    <xsd:sequence>
573      <xsd:element name="auth-method"
574                   type="javaee:auth-methodType"
575                   minOccurs="0"/>
576      <xsd:element name="realm-name"
577                   type="javaee:string"
578                   minOccurs="0">
579        <xsd:annotation>
580          <xsd:documentation>
581
582            The realm name element specifies the realm name to
583            use in HTTP Basic authorization.
584
585          </xsd:documentation>
586        </xsd:annotation>
587      </xsd:element>
588      <xsd:element name="form-login-config"
589                   type="javaee:form-login-configType"
590                   minOccurs="0"/>
591    </xsd:sequence>
592    <xsd:attribute name="id"
593                   type="xsd:ID"/>
594  </xsd:complexType>
595
596
597<!-- **************************************************** -->
598
599  <xsd:complexType name="mime-mappingType">
600    <xsd:annotation>
601      <xsd:documentation>
602
603        The mime-mappingType defines a mapping between an extension
604        and a mime type.
605
606        Used in: web-app
607
608      </xsd:documentation>
609    </xsd:annotation>
610    <xsd:sequence>
611      <xsd:annotation>
612        <xsd:documentation>
613
614          The extension element contains a string describing an
615          extension. example: "txt"
616
617        </xsd:documentation>
618      </xsd:annotation>
619      <xsd:element name="extension"
620                   type="javaee:string"/>
621      <xsd:element name="mime-type"
622                   type="javaee:mime-typeType"/>
623    </xsd:sequence>
624    <xsd:attribute name="id"
625                   type="xsd:ID"/>
626  </xsd:complexType>
627
628
629<!-- **************************************************** -->
630
631  <xsd:complexType name="mime-typeType">
632    <xsd:annotation>
633      <xsd:documentation>
634
635        The mime-typeType is used to indicate a defined mime type.
636
637        Example:
638        "text/plain"
639
640        Used in: mime-mapping
641
642      </xsd:documentation>
643    </xsd:annotation>
644    <xsd:simpleContent>
645      <xsd:restriction base="javaee:string">
646        <xsd:pattern value="[^\p{Cc}^\s]+/[^\p{Cc}^\s]+"/>
647      </xsd:restriction>
648    </xsd:simpleContent>
649  </xsd:complexType>
650
651
652<!-- **************************************************** -->
653
654  <xsd:complexType name="security-constraintType">
655    <xsd:annotation>
656      <xsd:documentation>
657
658        The security-constraintType is used to associate
659        security constraints with one or more web resource
660        collections
661
662        Used in: web-app
663
664      </xsd:documentation>
665    </xsd:annotation>
666    <xsd:sequence>
667      <xsd:element name="display-name"
668                   type="javaee:display-nameType"
669                   minOccurs="0"
670                   maxOccurs="unbounded"/>
671      <xsd:element name="web-resource-collection"
672                   type="javaee:web-resource-collectionType"
673                   maxOccurs="unbounded"/>
674      <xsd:element name="auth-constraint"
675                   type="javaee:auth-constraintType"
676                   minOccurs="0"/>
677      <xsd:element name="user-data-constraint"
678                   type="javaee:user-data-constraintType"
679                   minOccurs="0"/>
680    </xsd:sequence>
681    <xsd:attribute name="id"
682                   type="xsd:ID"/>
683  </xsd:complexType>
684
685
686<!-- **************************************************** -->
687
688  <xsd:complexType name="servletType">
689    <xsd:annotation>
690      <xsd:documentation>
691
692        The servletType is used to declare a servlet.
693        It contains the declarative data of a
694        servlet. If a jsp-file is specified and the load-on-startup
695        element is present, then the JSP should be precompiled and
696        loaded.
697
698        Used in: web-app
699
700      </xsd:documentation>
701    </xsd:annotation>
702    <xsd:sequence>
703      <xsd:group ref="javaee:descriptionGroup"/>
704      <xsd:element name="servlet-name"
705                   type="javaee:servlet-nameType"/>
706      <xsd:choice minOccurs="0"
707                  maxOccurs="1">
708        <xsd:element name="servlet-class"
709                     type="javaee:fully-qualified-classType">
710          <xsd:annotation>
711            <xsd:documentation>
712
713              The servlet-class element contains the fully
714              qualified class name of the servlet.
715
716            </xsd:documentation>
717          </xsd:annotation>
718        </xsd:element>
719        <xsd:element name="jsp-file"
720                     type="javaee:jsp-fileType"/>
721      </xsd:choice>
722      <xsd:element name="init-param"
723                   type="javaee:param-valueType"
724                   minOccurs="0"
725                   maxOccurs="unbounded"/>
726      <xsd:element name="load-on-startup"
727                   type="javaee:load-on-startupType"
728                   minOccurs="0">
729        <xsd:annotation>
730          <xsd:documentation>
731
732            The load-on-startup element indicates that this
733            servlet should be loaded (instantiated and have
734            its init() called) on the startup of the web
735            application. The optional contents of these
736            element must be an integer indicating the order in
737            which the servlet should be loaded. If the value
738            is a negative integer, or the element is not
739            present, the container is free to load the servlet
740            whenever it chooses. If the value is a positive
741            integer or 0, the container must load and
742            initialize the servlet as the application is
743            deployed. The container must guarantee that
744            servlets marked with lower integers are loaded
745            before servlets marked with higher integers. The
746            container may choose the order of loading of
747            servlets with the same load-on-start-up value.
748
749          </xsd:documentation>
750        </xsd:annotation>
751      </xsd:element>
752      <xsd:element name="enabled"
753                   type="javaee:true-falseType"
754                   minOccurs="0"/>
755      <xsd:element name="async-supported"
756                   type="javaee:true-falseType"
757                   minOccurs="0"/>
758      <xsd:element name="run-as"
759                   type="javaee:run-asType"
760                   minOccurs="0"/>
761      <xsd:element name="security-role-ref"
762                   type="javaee:security-role-refType"
763                   minOccurs="0"
764                   maxOccurs="unbounded"/>
765      <xsd:element name="multipart-config"
766                   type="javaee:multipart-configType"
767                   minOccurs="0"
768                   maxOccurs="1"/>
769    </xsd:sequence>
770    <xsd:attribute name="id"
771                   type="xsd:ID"/>
772  </xsd:complexType>
773
774
775<!-- **************************************************** -->
776
777  <xsd:complexType name="servlet-mappingType">
778    <xsd:annotation>
779      <xsd:documentation>
780
781        The servlet-mappingType defines a mapping between a
782        servlet and a url pattern.
783
784        Used in: web-app
785
786      </xsd:documentation>
787    </xsd:annotation>
788    <xsd:sequence>
789      <xsd:element name="servlet-name"
790                   type="javaee:servlet-nameType"/>
791      <xsd:element name="url-pattern"
792                   type="javaee:url-patternType"
793                   minOccurs="1"
794                   maxOccurs="unbounded"/>
795    </xsd:sequence>
796    <xsd:attribute name="id"
797                   type="xsd:ID"/>
798  </xsd:complexType>
799
800
801<!-- **************************************************** -->
802
803  <xsd:complexType name="servlet-nameType">
804    <xsd:annotation>
805      <xsd:documentation>
806
807        The servlet-name element contains the canonical name of the
808        servlet. Each servlet name is unique within the web
809        application.
810
811      </xsd:documentation>
812    </xsd:annotation>
813    <xsd:simpleContent>
814      <xsd:extension base="javaee:nonEmptyStringType"/>
815    </xsd:simpleContent>
816  </xsd:complexType>
817
818
819<!-- **************************************************** -->
820
821  <xsd:complexType name="session-configType">
822    <xsd:annotation>
823      <xsd:documentation>
824
825        The session-configType defines the session parameters
826        for this web application.
827
828        Used in: web-app
829
830      </xsd:documentation>
831    </xsd:annotation>
832    <xsd:sequence>
833      <xsd:element name="session-timeout"
834                   type="javaee:xsdIntegerType"
835                   minOccurs="0">
836        <xsd:annotation>
837          <xsd:documentation>
838
839            The session-timeout element defines the default
840            session timeout interval for all sessions created
841            in this web application. The specified timeout
842            must be expressed in a whole number of minutes.
843            If the timeout is 0 or less, the container ensures
844            the default behaviour of sessions is never to time
845            out. If this element is not specified, the container
846            must set its default timeout period.
847
848          </xsd:documentation>
849        </xsd:annotation>
850      </xsd:element>
851      <xsd:element name="cookie-config"
852                   type="javaee:cookie-configType"
853                   minOccurs="0">
854        <xsd:annotation>
855          <xsd:documentation>
856
857            The cookie-config element defines the configuration of the
858            session tracking cookies created by this web application.
859
860          </xsd:documentation>
861        </xsd:annotation>
862      </xsd:element>
863      <xsd:element name="tracking-mode"
864                   type="javaee:tracking-modeType"
865                   minOccurs="0"
866                   maxOccurs="3">
867        <xsd:annotation>
868          <xsd:documentation>
869
870            The tracking-mode element defines the tracking modes
871            for sessions created by this web application
872
873          </xsd:documentation>
874        </xsd:annotation>
875      </xsd:element>
876    </xsd:sequence>
877    <xsd:attribute name="id"
878                   type="xsd:ID"/>
879  </xsd:complexType>
880
881
882<!-- **************************************************** -->
883
884  <xsd:complexType name="cookie-configType">
885    <xsd:annotation>
886      <xsd:documentation>
887
888        The cookie-configType defines the configuration for the
889        session tracking cookies of this web application.
890
891        Used in: session-config
892
893      </xsd:documentation>
894    </xsd:annotation>
895    <xsd:sequence>
896      <xsd:element name="name"
897                   type="javaee:cookie-nameType"
898                   minOccurs="0">
899        <xsd:annotation>
900          <xsd:documentation>
901
902            The name that will be assigned to any session tracking
903            cookies created by this web application.
904            The default is JSESSIONID
905
906          </xsd:documentation>
907        </xsd:annotation>
908      </xsd:element>
909      <xsd:element name="domain"
910                   type="javaee:cookie-domainType"
911                   minOccurs="0">
912        <xsd:annotation>
913          <xsd:documentation>
914
915            The domain name that will be assigned to any session tracking
916            cookies created by this web application.
917
918          </xsd:documentation>
919        </xsd:annotation>
920      </xsd:element>
921      <xsd:element name="path"
922                   type="javaee:cookie-pathType"
923                   minOccurs="0">
924        <xsd:annotation>
925          <xsd:documentation>
926
927            The path that will be assigned to any session tracking
928            cookies created by this web application.
929
930          </xsd:documentation>
931        </xsd:annotation>
932      </xsd:element>
933      <xsd:element name="comment"
934                   type="javaee:cookie-commentType"
935                   minOccurs="0">
936        <xsd:annotation>
937          <xsd:documentation>
938
939            The comment that will be assigned to any session tracking
940            cookies created by this web application.
941
942          </xsd:documentation>
943        </xsd:annotation>
944      </xsd:element>
945      <xsd:element name="http-only"
946                   type="javaee:true-falseType"
947                   minOccurs="0">
948        <xsd:annotation>
949          <xsd:documentation>
950
951            Specifies whether any session tracking cookies created
952            by this web application will be marked as HttpOnly
953
954          </xsd:documentation>
955        </xsd:annotation>
956      </xsd:element>
957      <xsd:element name="secure"
958                   type="javaee:true-falseType"
959                   minOccurs="0">
960        <xsd:annotation>
961          <xsd:documentation>
962
963            Specifies whether any session tracking cookies created
964            by this web application will be marked as secure.
965            When true, all session tracking cookies must be marked
966            as secure independent of the nature of the request that
967            initiated the corresponding session.
968            When false, the session cookie should only be marked secure
969            if the request that initiated the session was secure.
970
971          </xsd:documentation>
972        </xsd:annotation>
973      </xsd:element>
974      <xsd:element name="max-age"
975                   type="javaee:xsdIntegerType"
976                   minOccurs="0">
977        <xsd:annotation>
978          <xsd:documentation>
979
980            The lifetime (in seconds) that will be assigned to any
981            session tracking cookies created by this web application.
982            Default is -1
983
984          </xsd:documentation>
985        </xsd:annotation>
986      </xsd:element>
987    </xsd:sequence>
988    <xsd:attribute name="id"
989                   type="xsd:ID"/>
990  </xsd:complexType>
991
992
993<!-- **************************************************** -->
994
995  <xsd:complexType name="cookie-nameType">
996    <xsd:annotation>
997      <xsd:documentation>
998
999        The name that will be assigned to any session tracking
1000        cookies created by this web application.
1001        The default is JSESSIONID
1002
1003        Used in: cookie-config
1004
1005      </xsd:documentation>
1006    </xsd:annotation>
1007    <xsd:simpleContent>
1008      <xsd:extension base="javaee:nonEmptyStringType"/>
1009    </xsd:simpleContent>
1010  </xsd:complexType>
1011
1012
1013<!-- **************************************************** -->
1014
1015  <xsd:complexType name="cookie-domainType">
1016    <xsd:annotation>
1017      <xsd:documentation>
1018
1019        The domain name that will be assigned to any session tracking
1020        cookies created by this web application.
1021
1022        Used in: cookie-config
1023
1024      </xsd:documentation>
1025    </xsd:annotation>
1026    <xsd:simpleContent>
1027      <xsd:extension base="javaee:nonEmptyStringType"/>
1028    </xsd:simpleContent>
1029  </xsd:complexType>
1030
1031
1032<!-- **************************************************** -->
1033
1034  <xsd:complexType name="cookie-pathType">
1035    <xsd:annotation>
1036      <xsd:documentation>
1037
1038        The path that will be assigned to any session tracking
1039        cookies created by this web application.
1040
1041        Used in: cookie-config
1042
1043      </xsd:documentation>
1044    </xsd:annotation>
1045    <xsd:simpleContent>
1046      <xsd:extension base="javaee:nonEmptyStringType"/>
1047    </xsd:simpleContent>
1048  </xsd:complexType>
1049
1050
1051<!-- **************************************************** -->
1052
1053  <xsd:complexType name="cookie-commentType">
1054    <xsd:annotation>
1055      <xsd:documentation>
1056
1057        The comment that will be assigned to any session tracking
1058        cookies created by this web application.
1059
1060        Used in: cookie-config
1061
1062      </xsd:documentation>
1063    </xsd:annotation>
1064    <xsd:simpleContent>
1065      <xsd:extension base="javaee:nonEmptyStringType"/>
1066    </xsd:simpleContent>
1067  </xsd:complexType>
1068
1069
1070<!-- **************************************************** -->
1071
1072  <xsd:complexType name="tracking-modeType">
1073    <xsd:annotation>
1074      <xsd:documentation>
1075
1076        The tracking modes for sessions created by this web
1077        application
1078
1079        Used in: session-config
1080
1081      </xsd:documentation>
1082    </xsd:annotation>
1083    <xsd:simpleContent>
1084      <xsd:restriction base="javaee:string">
1085        <xsd:enumeration value="COOKIE"/>
1086        <xsd:enumeration value="URL"/>
1087        <xsd:enumeration value="SSL"/>
1088      </xsd:restriction>
1089    </xsd:simpleContent>
1090  </xsd:complexType>
1091
1092
1093<!-- **************************************************** -->
1094
1095  <xsd:complexType name="transport-guaranteeType">
1096    <xsd:annotation>
1097      <xsd:documentation>
1098
1099        The transport-guaranteeType specifies that the communication
1100        between client and server should be NONE, INTEGRAL, or
1101        CONFIDENTIAL. NONE means that the application does not
1102        require any transport guarantees. A value of INTEGRAL means
1103        that the application requires that the data sent between the
1104        client and server be sent in such a way that it can't be
1105        changed in transit. CONFIDENTIAL means that the application
1106        requires that the data be transmitted in a fashion that
1107        prevents other entities from observing the contents of the
1108        transmission. In most cases, the presence of the INTEGRAL or
1109        CONFIDENTIAL flag will indicate that the use of SSL is
1110        required.
1111
1112        Used in: user-data-constraint
1113
1114      </xsd:documentation>
1115    </xsd:annotation>
1116    <xsd:simpleContent>
1117      <xsd:restriction base="javaee:string">
1118        <xsd:enumeration value="NONE"/>
1119        <xsd:enumeration value="INTEGRAL"/>
1120        <xsd:enumeration value="CONFIDENTIAL"/>
1121      </xsd:restriction>
1122    </xsd:simpleContent>
1123  </xsd:complexType>
1124
1125
1126<!-- **************************************************** -->
1127
1128  <xsd:complexType name="user-data-constraintType">
1129    <xsd:annotation>
1130      <xsd:documentation>
1131
1132        The user-data-constraintType is used to indicate how
1133        data communicated between the client and container should be
1134        protected.
1135
1136        Used in: security-constraint
1137
1138      </xsd:documentation>
1139    </xsd:annotation>
1140    <xsd:sequence>
1141      <xsd:element name="description"
1142                   type="javaee:descriptionType"
1143                   minOccurs="0"
1144                   maxOccurs="unbounded"/>
1145      <xsd:element name="transport-guarantee"
1146                   type="javaee:transport-guaranteeType"/>
1147    </xsd:sequence>
1148    <xsd:attribute name="id"
1149                   type="xsd:ID"/>
1150  </xsd:complexType>
1151
1152
1153<!-- **************************************************** -->
1154
1155  <xsd:complexType name="war-pathType">
1156    <xsd:annotation>
1157      <xsd:documentation>
1158
1159        The elements that use this type designate a path starting
1160        with a "/" and interpreted relative to the root of a WAR
1161        file.
1162
1163      </xsd:documentation>
1164    </xsd:annotation>
1165    <xsd:simpleContent>
1166      <xsd:restriction base="javaee:string">
1167        <xsd:pattern value="/.*"/>
1168      </xsd:restriction>
1169    </xsd:simpleContent>
1170  </xsd:complexType>
1171
1172  <xsd:simpleType name="web-app-versionType">
1173    <xsd:annotation>
1174      <xsd:documentation>
1175
1176        This type contains the recognized versions of
1177        web-application supported. It is used to designate the
1178        version of the web application.
1179
1180      </xsd:documentation>
1181    </xsd:annotation>
1182    <xsd:restriction base="xsd:token">
1183      <xsd:enumeration value="3.1"/>
1184    </xsd:restriction>
1185  </xsd:simpleType>
1186
1187
1188<!-- **************************************************** -->
1189
1190  <xsd:complexType name="web-resource-collectionType">
1191    <xsd:annotation>
1192      <xsd:documentation>
1193
1194        The web-resource-collectionType is used to identify the
1195        resources and HTTP methods on those resources to which a
1196        security constraint applies. If no HTTP methods are specified,
1197        then the security constraint applies to all HTTP methods.
1198        If HTTP methods are specified by http-method-omission
1199        elements, the security constraint applies to all methods
1200        except those identified in the collection.
1201        http-method-omission and http-method elements are never
1202        mixed in the same collection.
1203
1204        Used in: security-constraint
1205
1206      </xsd:documentation>
1207    </xsd:annotation>
1208    <xsd:sequence>
1209      <xsd:element name="web-resource-name"
1210                   type="javaee:string">
1211        <xsd:annotation>
1212          <xsd:documentation>
1213
1214            The web-resource-name contains the name of this web
1215            resource collection.
1216
1217          </xsd:documentation>
1218        </xsd:annotation>
1219      </xsd:element>
1220      <xsd:element name="description"
1221                   type="javaee:descriptionType"
1222                   minOccurs="0"
1223                   maxOccurs="unbounded"/>
1224      <xsd:element name="url-pattern"
1225                   type="javaee:url-patternType"
1226                   maxOccurs="unbounded"/>
1227      <xsd:choice minOccurs="0"
1228                  maxOccurs="1">
1229        <xsd:element name="http-method"
1230                     type="javaee:http-methodType"
1231                     minOccurs="1"
1232                     maxOccurs="unbounded">
1233          <xsd:annotation>
1234            <xsd:documentation>
1235
1236              Each http-method names an HTTP method to which the
1237              constraint applies.
1238
1239            </xsd:documentation>
1240          </xsd:annotation>
1241        </xsd:element>
1242        <xsd:element name="http-method-omission"
1243                     type="javaee:http-methodType"
1244                     minOccurs="1"
1245                     maxOccurs="unbounded">
1246          <xsd:annotation>
1247            <xsd:documentation>
1248
1249              Each http-method-omission names an HTTP method to
1250              which the constraint does not apply.
1251
1252            </xsd:documentation>
1253          </xsd:annotation>
1254        </xsd:element>
1255      </xsd:choice>
1256    </xsd:sequence>
1257    <xsd:attribute name="id"
1258                   type="xsd:ID"/>
1259  </xsd:complexType>
1260
1261
1262<!-- **************************************************** -->
1263
1264  <xsd:complexType name="welcome-file-listType">
1265    <xsd:annotation>
1266      <xsd:documentation>
1267
1268        The welcome-file-list contains an ordered list of welcome
1269        files elements.
1270
1271        Used in: web-app
1272
1273      </xsd:documentation>
1274    </xsd:annotation>
1275    <xsd:sequence>
1276      <xsd:element name="welcome-file"
1277                   type="xsd:string"
1278                   maxOccurs="unbounded">
1279        <xsd:annotation>
1280          <xsd:documentation>
1281
1282            The welcome-file element contains file name to use
1283            as a default welcome file, such as index.html
1284
1285          </xsd:documentation>
1286        </xsd:annotation>
1287      </xsd:element>
1288    </xsd:sequence>
1289    <xsd:attribute name="id"
1290                   type="xsd:ID"/>
1291  </xsd:complexType>
1292
1293  <xsd:simpleType name="localeType">
1294    <xsd:annotation>
1295      <xsd:documentation>
1296
1297        The localeType defines valid locale defined by ISO-639-1
1298        and ISO-3166.
1299
1300      </xsd:documentation>
1301    </xsd:annotation>
1302    <xsd:restriction base="xsd:string">
1303      <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
1304    </xsd:restriction>
1305  </xsd:simpleType>
1306
1307  <xsd:simpleType name="encodingType">
1308    <xsd:annotation>
1309      <xsd:documentation>
1310
1311        The encodingType defines IANA character sets.
1312
1313      </xsd:documentation>
1314    </xsd:annotation>
1315    <xsd:restriction base="xsd:string">
1316      <xsd:pattern value="[^\s]+"/>
1317    </xsd:restriction>
1318  </xsd:simpleType>
1319
1320
1321<!-- **************************************************** -->
1322
1323  <xsd:complexType name="locale-encoding-mapping-listType">
1324    <xsd:annotation>
1325      <xsd:documentation>
1326
1327        The locale-encoding-mapping-list contains one or more
1328        locale-encoding-mapping(s).
1329
1330      </xsd:documentation>
1331    </xsd:annotation>
1332    <xsd:sequence>
1333      <xsd:element name="locale-encoding-mapping"
1334                   type="javaee:locale-encoding-mappingType"
1335                   maxOccurs="unbounded"/>
1336    </xsd:sequence>
1337    <xsd:attribute name="id"
1338                   type="xsd:ID"/>
1339  </xsd:complexType>
1340
1341
1342<!-- **************************************************** -->
1343
1344  <xsd:complexType name="locale-encoding-mappingType">
1345    <xsd:annotation>
1346      <xsd:documentation>
1347
1348        The locale-encoding-mapping contains locale name and
1349        encoding name. The locale name must be either "Language-code",
1350        such as "ja", defined by ISO-639 or "Language-code_Country-code",
1351        such as "ja_JP".  "Country code" is defined by ISO-3166.
1352
1353      </xsd:documentation>
1354    </xsd:annotation>
1355    <xsd:sequence>
1356      <xsd:element name="locale"
1357                   type="javaee:localeType"/>
1358      <xsd:element name="encoding"
1359                   type="javaee:encodingType"/>
1360    </xsd:sequence>
1361    <xsd:attribute name="id"
1362                   type="xsd:ID"/>
1363  </xsd:complexType>
1364
1365
1366<!-- **************************************************** -->
1367
1368  <xsd:complexType name="ordering-othersType">
1369    <xsd:annotation>
1370      <xsd:documentation>
1371
1372        This element indicates that the ordering sub-element in which
1373        it was placed should take special action regarding the ordering
1374        of this application resource relative to other application
1375        configuration resources.
1376        See section 8.2.2 of the specification for details.
1377
1378      </xsd:documentation>
1379    </xsd:annotation>
1380    <xsd:attribute name="id"
1381                   type="xsd:ID"/>
1382  </xsd:complexType>
1383
1384
1385<!-- **************************************************** -->
1386
1387  <xsd:complexType name="multipart-configType">
1388    <xsd:annotation>
1389      <xsd:documentation>
1390
1391        This element specifies configuration information related to the
1392        handling of multipart/form-data requests.
1393
1394      </xsd:documentation>
1395    </xsd:annotation>
1396    <xsd:sequence>
1397      <xsd:element name="location"
1398                   type="javaee:string"
1399                   minOccurs="0"
1400                   maxOccurs="1">
1401        <xsd:annotation>
1402          <xsd:documentation>
1403
1404            The directory location where uploaded files will be stored
1405
1406          </xsd:documentation>
1407        </xsd:annotation>
1408      </xsd:element>
1409      <xsd:element name="max-file-size"
1410                   type="xsd:long"
1411                   minOccurs="0"
1412                   maxOccurs="1">
1413        <xsd:annotation>
1414          <xsd:documentation>
1415
1416            The maximum size limit of uploaded files
1417
1418          </xsd:documentation>
1419        </xsd:annotation>
1420      </xsd:element>
1421      <xsd:element name="max-request-size"
1422                   type="xsd:long"
1423                   minOccurs="0"
1424                   maxOccurs="1">
1425        <xsd:annotation>
1426          <xsd:documentation>
1427
1428            The maximum size limit of multipart/form-data requests
1429
1430          </xsd:documentation>
1431        </xsd:annotation>
1432      </xsd:element>
1433      <xsd:element name="file-size-threshold"
1434                   type="xsd:integer"
1435                   minOccurs="0"
1436                   maxOccurs="1">
1437        <xsd:annotation>
1438          <xsd:documentation>
1439
1440            The size threshold after which an uploaded file will be
1441            written to disk
1442
1443          </xsd:documentation>
1444        </xsd:annotation>
1445      </xsd:element>
1446    </xsd:sequence>
1447  </xsd:complexType>
1448
1449</xsd:schema>
1450