12.5.3 Definitions in the DD (module settings)

Define the functionality for controlling the annotation references for the modules of Servlet 2.5 or later in web.xml. Note that for EJB 3.0 or later, you can only specify false in the metadata-complete attribute of the <ejb-jar> tag.

The following table describes the definition of the functionality for controlling the annotation references in the DD.

Table 12-13 Definition of the functionality for controlling the annotation references in the DD

ItemsDD typesSpecified tags and attributesSettings
Servlet 2.5 or laterweb.xmlmetadata-complete attribute of the <web-app> tagSpecify true to control the annotation reference.
Specify false to reference the annotations.
EJB 3.0 or laterejb-jar.xmlmetadata-complete attribute of the <ejb-jar> tagSpecify false to reference the annotations.

An example of settings is as follows:

Example of settings (for Servlet 2.5)

<web-app metadata-complete="true"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
:
</web-app>

The text in bold is the setting for the functionality for controlling the annotation references.

If the metadata-complete attribute of the DD is not specified and if the DD is also omitted, the operation is the same as when false is specified in the metadata-complete attribute.