[jboss-user] [Installation, Configuration & DEPLOYMENT] - Environment and context.xml

Mark.Eastman do-not-reply at jboss.com
Mon Aug 17 05:43:19 EDT 2009


In my tomcat deployed app I use the  element in META-INF/context.xml to override the environment value in web.xml. This will be copied to the conf/engine-name/host-name/mywebappname.xml on the first deployment. The administrator can then amend the file to provide the real value he wants.

In JBoss I cannot get this type of process to work. I have read a number of forums and jira issues referring to using context.xml and I have moved the file to WEB-INF. I have added additional xml to the context.xml file to make sure it is being parsed but the environment variable is not overriding the value in web.xml.

Here is my file;

    


I have tried true and false for the override. 

My questions are, will JBoss allow the web.xml env element (such as)
    <env-entry>
        A Test variable
        <env-entry-name>TestVariable</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>TestValue</env-entry-value>
    </env-entry>

to be overridden in the context.xml as per tomcat.

secondly how can I get the context.xml to be externalised from the war file so it is not overwritten upon subsequent deploys of the war file.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249876#4249876

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249876



More information about the jboss-user mailing list