title: Initialize spring bean profile through ContextLoaderListener in web.xml
body: <p>In my <code>web.xml</code> I'm declaring a <code>ContextLoaderListener</code> to configure spring application this way:</p>
  
  <pre><code>&lt;listener&gt;    
     &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;    
  &lt;/listener&gt;
  </code></pre>
  
  <p>In one of my spring configuration xml files, I'm using different <a href="http://spring.io/blog/2011/02/11/spring-framework-3-1-m1-released/" rel="nofollow">beans profile</a> for development and production.</p>
  
  <pre><code>&lt;beans profile="production"&gt;
     &lt;bean /&gt;
  &lt;/beans
  &lt;beans profile="development"&gt;
     &lt;bean /&gt;
  &lt;/beans
  </code></pre>
  
  <p>How I could set the default beans profile in the <code>web.xml</code>? is there something similar to the following when using <code>ContextLoaderListener</code> instead of spring servlet:</p>
  
  <pre><code>&lt;init-param&gt;
     &lt;param-name&gt;spring.profiles.active&lt;/param-name&gt;
     &lt;param-value&gt;production&lt;/param-value&gt;
  &lt;/init-param&gt;
  </code></pre>