title: how to set value in web.xml based on the environment
body: <p>I'm using sprint 3.1 profiles and have the following code in my web.xml</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;spring.profiles.active&lt;/param-name&gt;
      &lt;param-value&gt;dev&lt;/param-value&gt; 
  &lt;/context-param&gt;
  </code></pre>
  
  <p>In order to deploy to the test environment, my workflow currently requires me to change the property value to <code>test</code>, then make a jar and deploy it. However, I'd like to decouple from explicitly making this change. </p>
  
  <p>I want the workflow to be just build the war and deploy it to test. The test environment should have some variable set the <code>spring.profiles.active</code> variable to <code>test</code>. </p>
  
  <p><strong>Question</strong></p>
  
  <p>How do I set a variable, <code>spring.profiles.active</code>, in tomcat7 and configure the <code>web.xml</code> so that it instead reads the variable from servers configuration?</p>