[jboss-jira] [JBoss JIRA] (JBWEB-279) Overlays do not work as expected

Mustafa Musaji (JIRA) jira-events at lists.jboss.org
Tue Aug 27 07:27:26 EDT 2013


     [ https://issues.jboss.org/browse/JBWEB-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mustafa Musaji updated JBWEB-279:
---------------------------------

    Steps to Reproduce: 
Create a simple WAR with jboss-web.xml as below pointing to an overlay directory on your local machine

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="7.0" xmlns:jboss="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee jboss-web_7_0.xsd ">
    <overlay>/home/mmusaji/example/jboss-as-helloworld/</overlay>
</jboss-web>
{code}

If within this directory you have a index.html as well as your webapp, the one in your WAR is found. However, the CLI approach replaces the file with the one defined in the overlay. The jboss-web.xml approach works only if the file is not present in your webapp (i.e. it adds the file to your web app).


  was:
Create a simple WAR with jboss-web.xml as below pointing to an overlay directory on your local machine

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="7.0" xmlns:jboss="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee jboss-web_7_0.xsd ">
    <overlay>/home/mmusaji/Tickets/00904749/jboss-as-helloworld/</overlay>
</jboss-web>
{code}

If within this directory you have a index.html as well as your webapp, the one in your WAR is found. However, the CLI approach replaces the file with the one defined in the overlay. The jboss-web.xml approach works only if the file is not present in your webapp (i.e. it adds the file to your web app).



    
> Overlays do not work as expected
> --------------------------------
>
>                 Key: JBWEB-279
>                 URL: https://issues.jboss.org/browse/JBWEB-279
>             Project: JBoss Web
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Core
>    Affects Versions: JBossWeb-7.2.1.GA
>            Reporter: Mustafa Musaji
>            Assignee: Remy Maucherat
>
> It is expected that the <overlay> element in jboss-web.xml has the same outcome as the overlay feature in the CLI: https://docs.jboss.org/author/display/AS72/Deployment+Overlays
> In jboss-web.xml the overlays element is not used to actually overlay existing files but to add files to a deployment. This is confusing and either this should work the same as the CLI or the documentation around the <overlay> element in jboss-web.xml should clearly state this is not the case and that we do not replace artifacts but rather 
> Attached is a proposed patch that fixes this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list