| |
The GzipFilter compresses the output of pages for browsers which
understand compression.
<web-app>
<filter-mapping url-pattern='/*'
filter-name='com.caucho.http.filter.GzipFilter'/>
</web-app>
|
use-vary | Uses the standard Vary header for Accept-Encoding | true
|
no-cache | Sets the Cache-Control: no-cache header | false
|
The TransactionFilter wraps the request in a UserTransaction and
commits the transaction when the servlet completes.
<web-app>
<filter-mapping url-pattern='/DatabaseServlet/*'
filter-name='com.caucho.http.filter.TransactionFilter'/>
</web-app>
|
The ExpiresFilter sets the Expires cache control header, allowing
the servlet output to be cached for a short time.
Caching stock quotes for 60 seconds
<web-app>
<filter-mapping servlet-name='StockQuoteServlet'
filter-name='com.caucho.http.filter.ExpiresFilter'>
<init-param cache-time="60s"/>
</filter-mapping>
</web-app>
|
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.
Caching all anonymouse users *.jsp pages for 15 minutes
<web-app>
<filter-mapping url-pattern='*.jsp'
filter-name='com.caucho.http.filter.AnonymousExpiresFilter'>
<init-param cache-time="15m"/>
</filter-mapping>
</web-app>
|
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|