caucho
Resin
FAQ
Reference Guide
Demo
Tutorial

Getting Started
Configuration
IDE
Topics
JSP
XML/XSLT

Virtual Hosts
Balancing
Distributed Sessions
Caching
JavaScript
Filters
Servlets
Admin
WebDAV
Velocity
EJB Clients
JMX
Burlap
Hessian
 Filter Library

JavaScript
Topics
Servlets

GzipFilter

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-varyUses the standard Vary header for Accept-Encodingtrue
no-cacheSets the Cache-Control: no-cache headerfalse

TransactionFilter

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>

ExpiresFilter

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>

AnonymousExpiresFilter

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>

JavaScript
Topics
Servlets
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.