J2EE.8.4 J2EE: application XML DTD


J2EE.8.4 J2EE: application XML DTD

This section provides the XML DTD for the J2EE application deployment descriptor. The XML grammar for a J2EE application deployment descriptor is defined by the J2EE: application document type definition. The granularity of composition for J2EE application assembly is the J2EE module. A J2EE: application deployment descriptor contains a name and description for the application and the URI of a UI icon for the application, as well as a list of the J2EE modules that comprise the application. The content of the XML elements is in general case sensitive. This means, for example, that <role-name>Manager</role-name> is a different role than <role-name>manager</role-name> .

All valid J2EE application deployment descriptors must contain the following DOCTYPE declaration:

 <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD  J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/  application_1_2.dtd"> 

Figure J2EE.8-3 shows a graphic representation of the structure of the J2EE: application XML DTD.

Figure J2EE.8-3. J2EE :application XML DTD Structure

The DTD that follows defines the XML grammar for a J2EE application deployment descriptor.

 <!-- The alt-dd element specifies an optional URI to the post-assembly  version of the deployment descriptor file for a particular J2EE  module. The URI must specify the full pathname of the deployment  descriptor file relative to the application's root directory. If  alt-dd is not specified, the deployer must read the deployment  descriptor from the default location and file name required by the  respective component specification.  -->  <!ELEMENT alt-dd (#PCDATA)>  <!-- The application element is the root element of a J2EE application deployment descriptor.  -->  <!ELEMENT application (icon?, display-name, description?, module+, security-role*)>  <!-- The context-root element specifies the context root of a web application  -->  <!ELEMENT context-root (#PCDATA)>  <!-- The description element provides a human readable description of the application. The description element should include any information that the application assembler wants to provide the deployer.  -->  <!ELEMENT description (#PCDATA)>  <!-- The display-name element specifies an application name.  The application name is assigned to the application by the application assembler and is used to identify the application to the deployer at deployment time.  -->  <!ELEMENT display-name (#PCDATA)>  <!-- The ejb element specifies the URI of a ejb-jar, relative to the top level of the application package.  -->  <!ELEMENT ejb (#PCDATA)>  <!-- The icon element contains a small-icon and large-icon element which specify the URIs for a small and a large GIF or JPEG icon image to represent the application in a GUI.  -->  <!ELEMENT icon (small-icon?, large-icon?)>  <!-- The java element specifies the URI of a java application client module, relative to the top level of the application package.  -->  <!ELEMENT java (#PCDATA)>  <!-- The large-icon element specifies the URI for a large GIF or JPEG icon image to represent the application in a GUI.  -->  <!ELEMENT large-icon (#PCDATA)>  <!-- The module element represents a single J2EE module and contains an ejb, java, or web element, which indicates the module type and contains a path to the module file, and an optional alt-dd element, which specifies an optional URI to the post-assembly version of the deployment descriptor.  The application deployment descriptor must have one module element for each J2EE module in the application package.  -->  <!ELEMENT module ((ejb  java  web), alt-dd?)>  <!-- The role-name element contains the name of a security role.  -->  <!ELEMENT role-name (#PCDATA)>  <!-- The security-role element contains the definition of a security role which is global to the application. The definition consists of a description of the security role, and the security role name. The descriptions at this level override those in the component level security-role definitions and must be the descriptions tool display  to the deployer.  -->  <!ELEMENT security-role (description?, role-name)>  <!-- The small-icon element specifies the URI for a small GIF or JPEG icon image to represent the application in a GUI.  -->  <!ELEMENT small-icon (#PCDATA)>  <!-- The web element contains the web-uri and context-root of a web application module.  -->  <!ELEMENT web (web-uri, context-root)>  <!-- The web-uri element specifies the URI of a web application file, relative to the top level of the application package.  -->  <!ELEMENT web-uri (#PCDATA)>  <!-- The ID mechanism is to allow tools to easily make tool-specific references to the elements of the deployment descriptor.   -->  <!ATTLIST alt-dd id ID #IMPLIED>  <!ATTLIST application id ID #IMPLIED>  <!ATTLIST context-root id ID #IMPLIED>  <!ATTLIST description id ID #IMPLIED>  <!ATTLIST display-name id ID #IMPLIED>  <!ATTLIST ejb id ID #IMPLIED>  <!ATTLIST icon id ID #IMPLIED>  <!ATTLIST java id ID #IMPLIED>  <!ATTLIST large-icon id ID #IMPLIED>  <!ATTLIST module id ID #IMPLIED>  <!ATTLIST role-name id ID #IMPLIED>  <!ATTLIST security-role id ID #IMPLIED>  <!ATTLIST small-icon id ID #IMPLIED>  <!ATTLIST web id ID #IMPLIED>  <!ATTLIST web-uri id ID #IMPLIED> 


Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net