Utility Tools
CHAPTER 18
J2EE Deployment Descriptor DTDs
This chapter provides information about the DTDs for the standard J2EE deployment descriptors. It includes these sections:

DTD files
Each type of J2EE archive has its own corresponding deployment descriptor and DTD:
J2EE version
|
Deployment descriptor type
|
DTD file
|
1.2
|
EAR
|
application_1_2.dtd
|
view
|
WAR
|
web-app_2_2.dtd
|
view
|
EJB JAR
|
ejb-jar_1_1.dtd
|
view
|
Client JAR
|
application-client_1_2.dtd
|
view
|
1.3
|
EAR
|
application_1_3.dtd
|
view
|
WAR
|
web-app_2_3.dtd
|
view
|
RAR
|
connector_1_0.dtd
|
view
|
EJB JAR
|
ejb-jar_2_0.dtd
|
view
|
Client JAR
|
application-client_1_3.dtd
|
view
|

Location
These DTD files are located in the lib\dtds directory of your J2EE SDK installation. Copies of them are also provided in the Novell exteNd Common\Resources\DTDCatalog directory.

Use
The deployment descriptor DTDs are used when you package J2EE archives. These DTDs (XML document type definitions) describe the structure you must follow when writing deployment descriptors (XML files) to supply declarative data and assembly instructions for your archives.
The deployment descriptors you write must adhere to these guidelines:
Deployment descriptor type
|
Guidelines
|
EAR
|
File name: application.xml
Stored in: META-INF directory of the archive
DOCTYPE statement (J2EE 1.2):
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc. //DTD J2EE Application 1.2//EN"
"http://java.sun.com/j2ee/dtds/application_1_2.dtd">
DOCTYPE statement (J2EE 1.3):
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
|
WAR
|
File name: web.xml
Stored in: WEB-INF directory of the archive
DOCTYPE statement (J2EE 1.2):
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
DOCTYPE statement (J2EE 1.3):
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
RAR
|
File name: ra.xml
Stored in: META-INF directory of the archive
DOCTYPE statement (J2EE 1.3):
<!DOCTYPE connector PUBLIC
"-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
"http://java.sun.com/dtd/connector_1_0.dtd">
|
EJB JAR
|
File name: ejb-jar.xml
Stored in: META-INF directory of the archive
DOCTYPE statement (J2EE 1.2):
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
"http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
DOCTYPE statement (J2EE 1.3):
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
|
Client JAR
|
File name: application-client.xml
Stored in: META-INF directory of the archive
DOCTYPE statement (J2EE 1.2):
<!DOCTYPE application-client PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
DOCTYPE statement (J2EE 1.3):
<!DOCTYPE application-client PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
"http://java.sun.com/dtd/application-client_1_3.dtd">
|

Documentation
DTDs
For detailed information on these DTDs (including the elements they define for use in your deployment descriptors):
Go to the table of DTD files at the beginning of this chapter.
Click view to display a DTD file (the copy provided with the Novell exteNd Director development environment).
Read the comments in the DTD file (if you need additional DTD documentation, see the Sun J2EE specifications).
Support for deployment descriptors
To learn about development environment support for writing and using deployment descriptors, see:
Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...