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.
- In the left panel of the WebSphere admin console, expand Applications and select All Applications.
- Select an application.
- 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.