title: Access to Application Context from Grails Filter Constructor
body: <p>How can I access the <strong>Application Context</strong> from a Grails <strong>Filter</strong>.  I am able to do so from a Controller by using the following:</p>
  
  <pre><code>def ctx = ApplicationHolder.application.mainContext
  </code></pre>
  
  <p>But in a Filter ctx is null.</p>
  
  <p>In this case, I'm specifically trying to access the application context in the Filter's constructor.</p>