title: Get filter init parameters in a servlet
body: <p>I have a filter that looks like this:</p>
  
  <pre><code>   &lt;filter&gt;
        &lt;filter-name&gt;TestFilter&lt;/filter-name&gt;
        &lt;filter-class&gt;org.TestFilter&lt;/filter-class&gt;
        &lt;init-param&gt;
           &lt;param-name&gt;timeout&lt;/param-name&gt;
           &lt;param-value&gt;30&lt;/param-value&gt;
        &lt;/init-param&gt;
     &lt;/filter&gt;
  </code></pre>
  
  <p>Since we are talking ServletFilter and Servlets.  Essentially, I am already in my servlet and have executed the first part of the doFilter.  So the container must know the init-parameter.  I don't have access to change the Filter class.  </p>
  
  <p><strong>Is it possible to get the init-parameter value given an HttpServletRequest object?</strong></p>
  
  <p>The only solution I can think of is to read the web.xml as a resource and try to find the value manually.  But it feels like there is a better solution.</p>