tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugen Kuleshov <>
Subject Plugnins/Filters for servlet engine
Date Mon, 24 Jan 2000 16:09:49 GMT

  Most commertial web servers have filtering feature. Apache web server
have loadable modules (looks like filters). 
  Filter is a server plugin for modify request to server (or response to
client) and move next.

  For example I need to translate encoding of all clients requests on
fly. Current solution - use mod_charset for Apache ( Russian Apache
project - ).
  Of course I can add encoding translation to all my servlets but it is
not good way.
  And it can be usefull not only for charset translation.

  It is possible to add API to registering filters (or just add to
servlet engine config).
  All filters must implement this interface:

public interface filter {
  HttpServletRequest requestFilter( HttpServletRequest req);
  HttpServletResponse responseFilter( HttpServletResponse res);

  Filter can change request and response objects (parameters and
properties) and return modified to servlet engine. Also servlet can add
some Attributes to request.

  Any comments?

  Eugen Kuleshov.

View raw message