<s1 title="Filter Library">

<s2 title='GzipFilter'>

<p>The GzipFilter compresses the output of pages for browsers which
understand compression.</p>

<example>
&lt;web-app>
  &lt;filter-mapping url-pattern='/*'
                  filter-name='com.caucho.http.filter.GzipFilter'/>
&lt;/web-app>
</example>

<deftable>
<tr><td>use-vary<td>Uses the standard Vary header for Accept-Encoding<td>true
<tr><td>no-cache<td>Sets the Cache-Control: no-cache header<td>false
</deftable>

</s2>

<s2 title='TransactionFilter'>

<p>The TransactionFilter wraps the request in a UserTransaction and
commits the transaction when the servlet completes.</p>

<example>
&lt;web-app>
  &lt;filter-mapping url-pattern='/DatabaseServlet/*'
                  filter-name='com.caucho.http.filter.TransactionFilter'/>
&lt;/web-app>
</example>

</s2>

<s2 title='ExpiresFilter'>

<p>The ExpiresFilter sets the Expires cache control header, allowing
the servlet output to be cached for a short time.</p>

<example title="Caching stock quotes for 60 seconds">
&lt;web-app>
  &lt;filter-mapping servlet-name='StockQuoteServlet'
                  filter-name='com.caucho.http.filter.ExpiresFilter'>
    &lt;init-param cache-time="60s"/>
  &lt;/filter-mapping>
&lt;/web-app>
</example>

</s2>

<s2 title='AnonymousExpiresFilter'>

<p>The AnonymousExpiresFilter caches output for anonymous, i.e.
non-logged in users.  When a page has custom formatting for
logged in users, it may still want to cache the results for
non-logged in users saving time and database access.
</p>

<example title="Caching all anonymouse users *.jsp pages for 15 minutes">
&lt;web-app>
  &lt;filter-mapping url-pattern='*.jsp'
                  filter-name='com.caucho.http.filter.AnonymousExpiresFilter'>
    &lt;init-param cache-time="15m"/>
  &lt;/filter-mapping>
&lt;/web-app>
</example>

</s2>

</s1>
