title: How to use environment variables in a .properties or a xml file?
body: <p>I am trying to configure my tomcat server.xml and I need to set value to something from an environment variable. I can't seem to find a way around from that.</p>
  <p>I know how to use values stored in a properties file but I can't set a variable to use my environment variable in a property file as well. is there a work around?
  I tried the following:</p>
  <pre><code>1 - 
  .xml file
  &lt;Resource
  user=&quot;${VAR}&quot;
  .../&gt; 
  2 - 
  &lt;Resource
  user=&quot;${env.VAR}&quot;
  .../&gt; 
  3 -
  .properties file
  myVar=${VAR} and then 
  &lt;Resource
  user=&quot;${myVar}&quot;
  .../&gt; 
  </code></pre>