Create a directory /tmp/files for overlay
Start JBoss EAP 7.2.5.GA
Deploy an web app having <overlay> setting in jboss-web.xml
<?xml version= "1.0" encoding= "UTF-8" ?>
<jboss-web>
<overlay>/tmp/files/</overlay>
</jboss-web>
echo 'aaa' > /tmp/files/index.html
Notice that index.html already exist in the web app
curl[ http://localhost:8080/JSPSample/index.html |http://localhost:8080/JSPSample/index.html]
aaa is not displayed -> wrong
echo '111' > /tmp/files/index1.html
Notice that index1.html does not exist in the web app
curl http://localhost:8080/JSPSample/index1.html
111 is displayed -> right
echo '222' > /tmp/files/index1.html
Notice that index1.html does not exist in the web app but is modified in the overlay
curl http://localhost:8080/JSPSample/index1.html
222 is displayed -> right
However, if I create the overlay with CLI it works:
echo 'aaa' > /tmp/overlay/index.html
deployment-overlay add --name=myOverlay --content=index.html=/tmp/overlay/index.html --deployments=JSPSample.war --redeploy-affected
curl http://localhost:8080/JSPSample/index.html
aaa is displayed -> correct
But If I modify the index.html the result is not updated:
echo 'bbb' > /tmp/overlay/index.html
curl http://localhost:8080/JSPSample/index.html
bbb is not displayed -> wrong