<document>
<header>
<product>resin</product>
<title>Servlets and Filters FAQ</title>
<description>
</description>
</header>

<body>
<summary objsummary-in-localtoc='1'/>

<faq title="Can I put a filter in resin.conf that get's executed before the filters in web.xml?">
<description>

<p>
I would like to have a filter in resin.conf that always gets executed first in
the filter chain to provide stats about the URL's that are called and the
response time.
</p>

</description>

<p>
All the web.xml definitions are before the &lt;web-app&gt; in the resin.conf.
</p>

<p>
Here's some more details:
</p>

<p>
All the &lt;web-app-default&gt; are concatenated in order.  The &lt;web-app&gt; in
the resin.conf comes at the end.
</p>

<p>
In the standard resin.conf, the first &lt;web-app-default&gt; comes from the
resin:import of the app-default.xml.  The app-default.xml has a
resin:import of the web.xml.
</p>

<p>
In other words, any &lt;filter&gt; in the web.xml appears before a
&lt;filter&gt; in the &lt;web-app&gt; in the resin.conf.  
</p>

<p>
You could add a &lt;web-app-default&gt; before the &lt;resin:import&gt; of
app-default.xml to add a filter before the web.xml.
</p>


</faq>


</body>
</document>
