WebSphere Deployment Descriptor

Home > Search
  by

A deployment descriptor is an XML file that contains information about a deployed application. For example, the following is a very basic deployment descriptor for an EAR named "Delta" that contains a single WAR named "Beta".

<application id="Application_ID" version="7" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" >
 <display-name> Delta</display-name>
 <initialize-in-order> False</initialize-in-order>
   <module id="Module_1521378866851" >
     <web>
       <web-uri> Beta.war</web-uri>
       <context-root> /beta</context-root>
     </web>
   </module>
</application>

 

An applications deployment descriptor XML file can be viewed in the WebSphere admin console.  Or, the XML file can be viewed on the command line, at dmgr_home/profiles/your_profile/wstemp/######/workspace/cells/your_cell/application/your_app/deployments/your_app/META-INF/application.xml.

  1. In the left panel of the WebSphere admin console, expand Applications and select All Applications.
  2. Select an application.
  3. Select View Deployment Descriptor.

 

The deployment descriptor file is created by reading certain files in the application, such as the web.xml file of a WAR or the application.xml file of an EAR. For example, in this example, the application.xml file of the EAR has "/BogusRoot" as the context root for the Beta WAR.

 

When the EAR is deployed, the context root of the Beta application in the deployment descriptor will be "/BogusRoot".

 

This could be resolved by selecting Applications > All Applications > app > Context root for web modules, and then correcting the context root. However, this is not an ideal solution, because the context root would need to be fixed everytime the EAR is deployed. A much more reasonable solution will be to correct the context root in the application.xml file in the application developer tool, such as Eclipse.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments