title: Use environment specific variable as dynamic init param of servlet filters
body: <p>I have some external library Filters I want to include in my Java/Spring webapp. So I don't have access to change the source of the Filters themselves. The Filters have configurable options based on the FilterConfig. Normally these can be set in the web.xml as </p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;foo&lt;/filter-name&gt;
      &lt;filter-class&gt;com.acme.FooFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;fooParam&lt;/param-name&gt;
          &lt;param-value&gt;bar&lt;/param-value&gt;
      &lt;/init-param&gt;
   &lt;/filter&gt;
  </code></pre>
  
  <p>However, I don't want a static value for the param. Rather I want to use a environment specific variable. Normally in Spring I would use environmental specific property files to supply these kinds of values. How do I get that into the web.xml without having separate web.xml files? Can I provide a custom FilterConfig? </p>