0 Replies Latest reply on Jun 22, 2013 5:47 PM by erhard

    Deployment Overlay with static web page

    erhard

      First I want to thank the JBoss developers for this great feature. I makes deployment descriptors acessible for operations people.

       

      I tried a deployment overlay with web.xml and with a static page index.html. It worked for the deplyment descriptor but not for the web page. Here is what I did:

      I deployed a WAR-File:

      {code}

      jar -tf  deployments/OverlayExample.war

      index.html

      index1.html

      WEB-INF/

      WEB-INF/web.xml

      {code}

      I have two overlay files:

      {code}

      overlay/index.html

      overlay/WEB-INF/web.xml

      {code}

      The web.xml changes the start-page from index.html to index1.html, the index.html change the content of the page. I activate the overlay with

      {code}

      deployment-overlay add --name=overlay1 \

           --content=/WEB-INF/web.xml=overlay/WEB-INF/web.xml,/index.html=overlay/index.html \

           --deployments=OverlayExample.war --redeploy-affected

      {code}

      after this "curl -s http://localhost:8080/OverlayExample/" shows index1.html as expected but "curl -s http://localhost:8080/OverlayExample/index.html" still shows the original page and not the overlay/index.html. Both overlay files are active:

      {code}

      [standalone@localhost:9999 /] /deployment-overlay=overlay1:read-resource(recursive=true, include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "content" => {

                  "/WEB-INF/web.xml" => {"content" => bytes {

                      0x33, 0xd7, 0x87, 0x05, 0x50, 0x3e, 0x31, 0xdf,

                      0x03, 0xea, 0xfa, 0xc5, 0x89, 0x09, 0x8b, 0xac,

                      0xd1, 0xf0, 0x96, 0x79

                  }},

                  "/index.html" => {"content" => bytes {

                      0x70, 0x37, 0xca, 0x74, 0x9c, 0x59, 0x9c, 0x54,

                      0x22, 0x5e, 0x87, 0x70, 0x32, 0x25, 0xe2, 0xfa,

                      0x33, 0x92, 0x03, 0x59

                  }}

              },

              "deployment" => {"OverlayExample.war" => {}}

          }

      }

      {code}

      Any ideas what could be wrong?

      Attached the WAR and config.