3
The web-app element is the root of the deployment descriptor for
7
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
8
context-param*, servlet*, servlet-mapping*, session-config?,
9
mime-mapping*, welcome-file-list?, error-page*, taglib*,
10
resource-ref*, security-constraint*, login-config?, security-role*,
11
env-entry*, ejb-ref*)>
14
The icon element contains a small-icon and a large-icon element
15
which specify the location within the web application for a small and
16
large image used to represent the web application in a GUI tool. At a
17
minimum, tools must accept GIF and JPEG format images.
20
<!ELEMENT icon (small-icon?, large-icon?)>
23
The small-icon element contains the location within the web
24
application of a file containing a small (16x16 pixel) icon image.
27
<!ELEMENT small-icon (#PCDATA)>
30
The large-icon element contains the location within the web
31
application of a file containing a large (32x32 pixel) icon image.
34
<!ELEMENT large-icon (#PCDATA)>
37
The display-name element contains a short name that is intended
38
to be displayed by GUI tools
41
<!ELEMENT display-name (#PCDATA)>
44
The description element is used to provide descriptive text about
48
<!ELEMENT description (#PCDATA)>
51
The distributable element, by its presence in a web application
52
deployment descriptor, indicates that this web application is
53
programmed appropriately to be deployed into a distributed servlet
57
<!ELEMENT distributable EMPTY>
60
The context-param element contains the declaration of a web
61
application's servlet context initialization parameters.
64
<!ELEMENT context-param (param-name, param-value, description?)>
67
The param-name element contains the name of a parameter.
70
<!ELEMENT param-name (#PCDATA)>
73
The param-value element contains the value of a parameter.
76
<!ELEMENT param-value (#PCDATA)>
79
The servlet element contains the declarative data of a
80
servlet. If a jsp-file is specified and the load-on-startup element is
81
present, then the JSP should be precompiled and loaded.
84
<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
85
(servlet-class|jsp-file), init-param*, load-on-startup?, security-role-ref*)>
88
The servlet-name element contains the canonical name of the
92
<!ELEMENT servlet-name (#PCDATA)>
95
The servlet-class element contains the fully qualified class name
99
<!ELEMENT servlet-class (#PCDATA)>
102
The jsp-file element contains the full path to a JSP file within
106
<!ELEMENT jsp-file (#PCDATA)>
109
The init-param element contains a name/value pair as an
110
initialization param of the servlet
113
<!ELEMENT init-param (param-name, param-value, description?)>
116
The load-on-startup element indicates that this servlet should be
117
loaded on the startup of the web application. The optional contents of
118
these element must be a positive integer indicating the order in which
119
the servlet should be loaded. Lower integers are loaded before higher
120
integers. If no value is specified, or if the value specified is not a
121
positive integer, the container is free to load it at any time in the
125
<!ELEMENT load-on-startup (#PCDATA)>
128
The servlet-mapping element defines a mapping between a servlet
132
<!ELEMENT servlet-mapping (servlet-name, url-pattern)>
135
The url-pattern element contains the url pattern of the
136
mapping. Must follow the rules specified in Section 10 of the Servlet
140
<!ELEMENT url-pattern (#PCDATA)>
143
The session-config element defines the session parameters for
144
this web application.
147
<!ELEMENT session-config (session-timeout?)>
150
The session-timeout element defines the default session timeout
151
interval for all sessions created in this web application. The
152
specified timeout must be expressed in a whole number of minutes.
155
<!ELEMENT session-timeout (#PCDATA)>
158
The mime-mapping element defines a mapping between an extension
162
<!ELEMENT mime-mapping (extension, mime-type)>
165
The extension element contains a string describing an
166
extension. example: "txt"
169
<!ELEMENT extension (#PCDATA)>
172
The mime-type element contains a defined mime type. example:
176
<!ELEMENT mime-type (#PCDATA)>
179
The welcome-file-list contains an ordered list of welcome files
183
<!ELEMENT welcome-file-list (welcome-file+)>
186
The welcome-file element contains file name to use as a default
187
welcome file, such as index.html
190
<!ELEMENT welcome-file (#PCDATA)>
193
The taglib element is used to describe a JSP tag library.
196
<!ELEMENT taglib (taglib-uri, taglib-location)>
199
The taglib-uri element describes a URI, relative to the location
200
of the web.xml document, identifying a Tag Library used in the Web
204
<!ELEMENT taglib-uri (#PCDATA)>
207
the taglib-location element contains the location (as a resource
208
relative to the root of the web application) where to find the Tag
209
Libary Description file for the tag library.
212
<!ELEMENT taglib-location (#PCDATA)>
215
The error-page element contains a mapping between an error code
216
or exception type to the path of a resource in the web application
219
<!ELEMENT error-page ((error-code | exception-type), location)>
222
The error-code contains an HTTP error code, ex: 404
225
<!ELEMENT error-code (#PCDATA)>
228
The exception type contains a fully qualified class name of a
232
<!ELEMENT exception-type (#PCDATA)>
235
The location element contains the location of the resource in the
239
<!ELEMENT location (#PCDATA)>
242
The resource-ref element contains a declaration of a Web
243
Application's reference to an external resource.
246
<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth)>
249
The res-ref-name element specifies the name of the resource
250
factory reference name.
253
<!ELEMENT res-ref-name (#PCDATA)>
256
The res-type element specifies the (Java class) type of the data
260
<!ELEMENT res-type (#PCDATA)>
263
The res-auth element indicates whether the application component
264
code performs resource signon programmatically or whether the
265
container signs onto the resource based on the principle mapping
266
information supplied by the deployer. Must be CONTAINER or SERVLET
269
<!ELEMENT res-auth (#PCDATA)>
272
The security-constraint element is used to associate security
273
constraints with one or more web resource collections
276
<!ELEMENT security-constraint (web-resource-collection+,
277
auth-constraint?, user-data-constraint?)>
280
The web-resource-collection element is used to identify a subset
281
of the resources and HTTP methods on those resources within a web
282
application to which a security constraint applies. If no HTTP methods
283
are specified, then the security constraint applies to all HTTP
287
<!ELEMENT web-resource-collection (web-resource-name, description?,
288
url-pattern*, http-method*)>
291
The web-resource-name contains the name of this web resource
295
<!ELEMENT web-resource-name (#PCDATA)>
298
The http-method contains an HTTP method (GET | POST |...)
301
<!ELEMENT http-method (#PCDATA)>
304
The user-data-constraint element is used to indicate how data
305
communicated between the client and container should be protected
308
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
311
The transport-guarantee element specifies that the communication
312
between client and server should be NONE, INTEGRAL, or
313
CONFIDENTIAL. NONE means that the application does not require any
314
transport guarantees. A value of INTEGRAL means that the application
315
requires that the data sent between the client and server be sent in
316
such a way that it can't be changed in transit. CONFIDENTIAL means
317
that the application requires that the data be transmitted in a
318
fashion that prevents other entities from observing the contents of
319
the transmission. In most cases, the presence of the INTEGRAL or
320
CONFIDENTIAL flag will indicate that the use of SSL is required.
323
<!ELEMENT transport-guarantee (#PCDATA)>
326
The auth-constraint element indicates the user roles that should
327
be permitted access to this resource collection. The role used here
328
must appear in a security-role-ref element.
331
<!ELEMENT auth-constraint (description?, role-name*)>
334
The role-name element contains the name of a security role.
337
<!ELEMENT role-name (#PCDATA)>
340
The login-config element is used to configure the authentication
341
method that should be used, the realm name that should be used for
342
this application, and the attributes that are needed by the form login
346
<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
349
The realm name element specifies the realm name to use in HTTP
353
<!ELEMENT realm-name (#PCDATA)>
356
The form-login-config element specifies the login and error pages
357
that should be used in form based login. If form based authentication
358
is not used, these elements are ignored.
361
<!ELEMENT form-login-config (form-login-page, form-error-page)>
364
The form-login-page element defines the location in the web app
365
where the page that can be used for login can be found
368
<!ELEMENT form-login-page (#PCDATA)>
371
The form-error-page element defines the location in the web app
372
where the error page that is displayed when login is not successful
376
<!ELEMENT form-error-page (#PCDATA)>
379
The auth-method element is used to configure the authentication
380
mechanism for the web application. As a prerequisite to gaining access
381
to any web resources which are protected by an authorization
382
constraint, a user must have authenticated using the configured
383
mechanism. Legal values for this element are "BASIC", "DIGEST",
384
"FORM", or "CLIENT-CERT".
387
<!ELEMENT auth-method (#PCDATA)>
390
The security-role element contains the declaration of a security
391
role which is used in the security-constraints placed on the web
395
<!ELEMENT security-role (description?, role-name)>
398
The role-name element contains the name of a role. This element
399
must contain a non-empty string.
402
<!ELEMENT security-role-ref (description?, role-name, role-link)>
405
The role-link element is used to link a security role reference
406
to a defined security role. The role-link element must contain the
407
name of one of the security roles defined in the security-role
411
<!ELEMENT role-link (#PCDATA)>
414
The env-entry element contains the declaration of an
415
application's environment entry. This element is required to be
416
honored on in J2EE compliant servlet containers.
419
<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
423
The env-entry-name contains the name of an application's
427
<!ELEMENT env-entry-name (#PCDATA)>
430
The env-entry-value element contains the value of an
431
application's environment entry
434
<!ELEMENT env-entry-value (#PCDATA)>
437
The env-entry-type element contains the fully qualified Java type
438
of the environment entry value that is expected by the application
439
code. The following are the legal values of env-entry-type:
440
java.lang.Boolean, java.lang.String, java.lang.Integer,
441
java.lang.Double, java.lang.Float.
444
<!ELEMENT env-entry-type (#PCDATA)>
447
The ejb-ref element is used to declare a reference to an
451
<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home, remote,
455
The ejb-ref-name element contains the name of an EJB
456
reference. This is the JNDI name that the servlet code uses to get a
457
reference to the enterprise bean.
460
<!ELEMENT ejb-ref-name (#PCDATA)>
463
The ejb-ref-type element contains the expected java class type of
467
<!ELEMENT ejb-ref-type (#PCDATA)>
470
The ejb-home element contains the fully qualified name of the
474
<!ELEMENT home (#PCDATA)>
477
The ejb-remote element contains the fully qualified name of the
478
EJB's remote interface
481
<!ELEMENT remote (#PCDATA)>
484
The ejb-link element is used in the ejb-ref element to specify
485
that an EJB reference is linked to an EJB in an encompassing Java2
486
Enterprise Edition (J2EE) application package. The value of the
487
ejb-link element must be the ejb-name of and EJB in the J2EE
491
<!ELEMENT ejb-link (#PCDATA)>
494
The ID mechanism is to allow tools to easily make tool-specific
495
references to the elements of the deployment descriptor. This allows
496
tools that produce additional deployment information (i.e information
497
beyond the standard deployment descriptor information) to store the
498
non-standard information in a separate file, and easily refer from
499
these tools-specific files to the information in the standard web-app
500
deployment descriptor.
503
<!ATTLIST web-app id ID #IMPLIED>
504
<!ATTLIST icon id ID #IMPLIED>
505
<!ATTLIST small-icon id ID #IMPLIED>
506
<!ATTLIST large-icon id ID #IMPLIED>
507
<!ATTLIST display-name id ID #IMPLIED>
508
<!ATTLIST description id ID #IMPLIED>
509
<!ATTLIST distributable id ID #IMPLIED>
510
<!ATTLIST context-param id ID #IMPLIED>
511
<!ATTLIST param-name id ID #IMPLIED>
512
<!ATTLIST param-value id ID #IMPLIED>
513
<!ATTLIST servlet id ID #IMPLIED>
514
<!ATTLIST servlet-name id ID #IMPLIED>
515
<!ATTLIST servlet-class id ID #IMPLIED>
516
<!ATTLIST jsp-file id ID #IMPLIED>
517
<!ATTLIST init-param id ID #IMPLIED>
518
<!ATTLIST load-on-startup id ID #IMPLIED>
519
<!ATTLIST servlet-mapping id ID #IMPLIED>
520
<!ATTLIST url-pattern id ID #IMPLIED>
521
<!ATTLIST session-config id ID #IMPLIED>
522
<!ATTLIST session-timeout id ID #IMPLIED>
523
<!ATTLIST mime-mapping id ID #IMPLIED>
524
<!ATTLIST extension id ID #IMPLIED>
525
<!ATTLIST mime-type id ID #IMPLIED>
526
<!ATTLIST welcome-file-list id ID #IMPLIED>
527
<!ATTLIST welcome-file id ID #IMPLIED>
528
<!ATTLIST taglib id ID #IMPLIED>
529
<!ATTLIST taglib-uri id ID #IMPLIED>
530
<!ATTLIST taglib-location id ID #IMPLIED>
531
<!ATTLIST error-page id ID #IMPLIED>
532
<!ATTLIST error-code id ID #IMPLIED>
533
<!ATTLIST exception-type id ID #IMPLIED>
534
<!ATTLIST location id ID #IMPLIED>
535
<!ATTLIST resource-ref id ID #IMPLIED>
536
<!ATTLIST res-ref-name id ID #IMPLIED>
537
<!ATTLIST res-type id ID #IMPLIED>
538
<!ATTLIST res-auth id ID #IMPLIED>
539
<!ATTLIST security-constraint id ID #IMPLIED>
540
<!ATTLIST web-resource-collection id ID #IMPLIED>
541
<!ATTLIST web-resource-name id ID #IMPLIED>
542
<!ATTLIST http-method id ID #IMPLIED>
543
<!ATTLIST user-data-constraint id ID #IMPLIED>
544
<!ATTLIST transport-guarantee id ID #IMPLIED>
545
<!ATTLIST auth-constraint id ID #IMPLIED>
546
<!ATTLIST role-name id ID #IMPLIED>
547
<!ATTLIST login-config id ID #IMPLIED>
548
<!ATTLIST realm-name id ID #IMPLIED>
549
<!ATTLIST form-login-config id ID #IMPLIED>
550
<!ATTLIST form-login-page id ID #IMPLIED>
551
<!ATTLIST form-error-page id ID #IMPLIED>
552
<!ATTLIST auth-method id ID #IMPLIED>
553
<!ATTLIST security-role id ID #IMPLIED>
554
<!ATTLIST security-role-ref id ID #IMPLIED>
555
<!ATTLIST role-link id ID #IMPLIED>
556
<!ATTLIST env-entry id ID #IMPLIED>
557
<!ATTLIST env-entry-name id ID #IMPLIED>
558
<!ATTLIST env-entry-value id ID #IMPLIED>
559
<!ATTLIST env-entry-type id ID #IMPLIED>
560
<!ATTLIST ejb-ref id ID #IMPLIED>
561
<!ATTLIST ejb-ref-name id ID #IMPLIED>
562
<!ATTLIST ejb-ref-type id ID #IMPLIED>
563
<!ATTLIST home id ID #IMPLIED>
564
<!ATTLIST remote id ID #IMPLIED>
565
<!ATTLIST ejb-link id ID #IMPLIED>