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)
A Test variable
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.
the context of the context.xml did not appear in the previous message, here it is again:
<Context> <Environment name="TestVariable" value="Defined Outside" type="java.lang.String" override="false"/> </Context>