title: How is the invocation sequence of Grails filters defined
body: <p>I am using <a href="http://www.grails.org/Filters" rel="noreferrer">filters</a> to handle authentication and some other pre-condition checks for a Grails application. I've run into a situation where it'd be nice to ensure that filter A is always invoked before filter B. </p>
  
  <p>According to the documentation the "<em>filters are executed in the order they are defined</em>" but it is unclear what that definition refers to. I am familiar with how that works for Java EE ServletFilters, where the sequence is declared by the order of corresponding tags in the web.xml, but as the deployment is handled automatically in Grails, I am not really sure where I could influence the order in which the filters are set up.</p>
  
  <p>Is that possible at all in Grails, and if so, how?</p>
  
  <p><strong>Update</strong></p>
  
  <p>If several filters are declared within one class, it's obvious that they'll be executed in the order that they were declared. I am more concerned with filters defined in different classes and the sequence that those classes will be considered in.</p>