Este contenido no está disponible en el idioma seleccionado.

10.9. Deployment Descriptor Overrides


From JBoss EAP 6.1 onward you can override deployment descriptors, JARs, classes, JSP pages, and other files at runtime. A deployment overlay represents a ruleset of files that must be overridden in the archive. It also provides links to the new files that must be used instead of the overridden ones. If the file being overridden is not present in the deployment archive, it will be added back to the deployment.

Procedure 10.18. Override the deployment descriptor using the Management CLI

The following steps assume that you already have a deployed application called app.war and you wish to override its WEB-INF/web.xml file with another web.xml file located in /home/user/web.xml.
  1. Add a deployment overlay and add content to it. You can achieve this in the following two ways:
    • Using DMR tree

      1. /deployment-overlay=myoverlay:add
      2. /deployment-overlay=myoverlay/content=WEB-INF\/web.xml:add(content={url=file:///home/user/web.xml})
        You can also 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
  2. Link the overlay to a deployment archive. You can achieve this in the following two ways:
    • Using DMR tree

      /deployment-overlay=myoverlay/deployment=app.war:add
    • Using convenience methods

      deployment-overlay link --name=myoverlay --deployments=app.war
      To specify multiple archive names, separate them by commas.
    Note that the deployment archive name need not exist on the server. You are specifying the name, but not yet linking it to an actual deployment.
  3. Redeploy the application

    /deployment=app.war:redeploy
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.