Skip to Main Content
Java Servlet Programming, 2nd Edition
book

Java Servlet Programming, 2nd Edition

by Jason Hunter, William Crawford
April 2001
Intermediate to advanced content levelIntermediate to advanced
780 pages
23h 48m
English
O'Reilly Media, Inc.
Content preview from Java Servlet Programming, 2nd Edition

Appendix C. Deployment Descriptor DTD Reference

A Document Type Definition (DTD) file dictates what is valid content within an XML file. This appendix provides the official DTD for the Servlet API 2.2 web application deployment descriptor. DTD files are not XML, but the syntax is easy to follow: each <!ELEMENT> tag defines in parentheses which child elements it may have, how many of each child it may have, and in what order. A question mark (?) after a child’s name means the child is optional (0 - 1), an asterisk (*) means the child may appear any number of times (0 - n), a plus sign (+) means some number of children must appear (1 - n), and no following character means the child is simply required (1). The syntax (x|y) means either x or y. The children of an element must follow the exact order listed within the parentheses.

Figures Figure C-1 through Figure C-4 graphically demonstrate the element structure; Example C-1 shows the DTD itself. Each <!ATTLIST> tag controls the allowed attributes for an element. In this DTD, the tag is used only to provide default id values. The rest of this appendix is reference material for the elements in the DTD.

The element structure of the deployment descriptor DTD

Figure C-1. The element structure of the deployment descriptor DTD

Figure C-2. 

Figure C-3. 

Figure C-4. 

Example C-1. The Deployment Descriptor ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Servlet Programming

Java Servlet Programming

Jason Hunter

Publisher Resources

ISBN: 0596000405Supplemental ContentErrata Page