1 Reply Latest reply on Aug 17, 2009 5:49 AM by mark.eastman

    Environment and context.xml

      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.