Sun Java System Web Server 6.1 SP7 Programmer's Guide to Web Applications

The sun-web-app_2_3-1.dtd File

The sun-web-app_2_3-1.dtd file defines the structure of the sun-web.xml file, including the elements it can contain and the subelements and attributes these elements can include. The sun-web-app_2_3-1.dtd file is located in the install_dir/bin/https/dtds directory.

Note –

Do not edit the sun-web-app_2_3-1.dtd file. The file contents change only with new versions of Sun Java System Web Server.

For more information about DTD files and XML, see the XML specification at:

Each element defined in a DTD file (which may be present in the corresponding XML file) can contain the following:


Elements can contain subelements. For example, the following file fragment defines the cache element.

<!ELEMENT cache (cache-helper*, default-helper?, property*, cache-mapping*)>

The ELEMENT tag specifies that a cache element can contain cache-helper, default-helper, property, and cache-mapping subelements.

The following table shows how optional suffix characters of subelements determine the requirement rules, or number of allowed occurrences, for the subelements. The left column lists the subelement ending character, and the right column lists the corresponding requirement rule.

Table 6–4 Requirement Rules and Subelement Suffixes

Subelement Suffix  

Requirement Rule  


Can contain zero or more of this subelement.


Can contain zero or one of this subelement.


Must contain one or more of this subelement.

element (no suffix)

Must contain only one of this subelement.

If an element cannot contain other elements, you see EMPTY or (#PCDATA) instead of a list of element names in parentheses.


Some elements contain character data instead of subelements. These elements have definitions of the following format:

<!ELEMENT element-name (#PCDATA)>

For example:

<!ELEMENT description (#PCDATA)>

In the sun-web.xml file, white space is treated as part of the data in a data element. Therefore, there should be no extra white space before or after the data delimited by a data element. For example:

<description>class name of session manager</description>


Elements that have ATTLIST tags contain attributes (name-value pairs). For example:

<!ATTLIST     cachemax-capacity CDATA     "4096"
              timeout           CDATA     "30"
              enabled           %boolean; "false">
A cache element can contain max-capacity, timeout, and enabled attributes.

The #REQUIRED label means that a value must be supplied. The #IMPLIED label means that the attribute is optional, and that Sun Java System Web Server generates a default value. Wherever possible, explicit defaults for optional attributes (such as "true") are listed.

Attribute declarations specify the type of the attribute. For example, CDATA means character data, and %boolean is a predefined enumeration.