A deployment descriptor is an extensible markup language (XML) file that specifies configuration and container options for an application or module.
This topic assumes that you have installed an application or module on a server and that you want to view its deployment descriptor.
When you create a Java 2 Platform, Enterprise Edition (J2EE) application or module in an assembly tool, the assembly tool creates deployment descriptor files for the application or module. Java Platform, Enterprise Edition (Java EE) 5 or later applications and modules might use annotations instead of deployment descriptors.
After an application or module is installed on a server, you can view its deployment descriptor in the administrative console. You cannot view Java EE 5 or later annotations.
Unless an application supports Java EE 5 or later, an enterprise archive (EAR) file must contain an application.xml file. The application.xml identifies each module of an application. A Java EE 5 application is not required to provide an application.xml file in the EAR file. When an application.xml file does not exist, the product examines the Java archive (JAR) file contents to determine whether the JAR file is an enterprise bean (EJB) module or an application client module. A JAR file should not contain more than one deployment descriptor in it. When an ejb-jar.xml file is found in a JAR file, the product considers it an EJB module. If an ejb-jar.xml file is not found and an application-client.xml is found, the product considers the JAR file to be an application client module. If both ejb-jar.xml and application-client.xml files exist in the JAR file, the product might consider a JAR file intended to be an application client module to be an EJB module or a JAR file intended to be an EJB module to be an application client module. A JAR file should not contain more than one kind of deployment descriptor.
The deployment descriptor for the application or module is displayed.
The deployment descriptor for the product DefaultApplication follows:
<application id="Application_ID" >
<display-name> DefaultApplication.ear</display-name>
<description> This is the IBM WebSphere Application Server Default Application.</<description>
<module id="WebModule_1" >
<web>
<web-uri> DefaultWebApplication.war</web-uri>
<context-root> /</context-root>
</web>
</module>
<module id="EjbModule_1" >
<ejb> Increment.jar</ejb>
</module>
<security-role id="SecurityRole_1204342979281" >
<description> All Authenticated users role.</description>
<role-name> All Role</role-name>
</security-role>
</application>
After displaying a deployment descriptor on the console page, do the following:
For example, examine the JAR files of your Java EE 5 or later module to ensure that each JAR file does not contain more than one kind of deployment descriptor. If a JAR file contains more than one kind of deployment descriptor, proceed to the next step and remove the extraneous deployment descriptor. Thus, if both ejb-jar.xml and application-client.xml files exist in a JAR file, remove the deployment descriptor that your module does not need.
You can edit a deployment descriptor file manually. However, it is preferable to edit a deployment descriptor using the console or in an assembly tool deployment descriptor editor to ensure that the deployment descriptor has valid properties and that its references contain appropriate values.
If your Java EE 5 or later module does not have a metadata-complete attribute or the metadata-complete attribute is set to false, you can instruct the product to write the entire module deployment descriptor, including deployment information from annotations, to XML format. On the Metadata for modules page, select metadata-complete attribute.