9.7. Deployment Descriptor Overrides
Procedure 9.15. Override the deployment descriptor using the Management CLI
app.war and you wish to override it's WEB-INF/web.xml file with another web.xml file located in /home/user/web.xml.
- Add a deployment overlay and add content to it. You can achieve this in the following two ways:
Using DMR tree
/deployment-overlay=myoverlay:add/deployment-overlay=myoverlay/content=WEB-INF\/web.xml:add(content={url=file:///home/user/web.xml})If you wish to, you may add more content rules using the second statement.
Using convenience methods
deployment-overlay add --name=myoverlay --content=WEB-INF/web.xml=/home/user/web.xml
Link the overlay to a deployment archive
deployment-overlay link --name=myoverlay --deployments=app.warYou may specify multiple archive names separated by commas./deployment-overlay=myoverlay/deployment=app.war:addNote that the deployment archive name need not exist on the server yet. You are specifying the name, but not linking it to an actual deployment yet.
Re-deploy the application
/deployment=app.war:redeploy

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.