Proposal for Jakarta-Filters

(0) Rationale

The Servlet 2.3 specification added the ability to implement Servlet Filters for a web application. By their very nature, filters are small reusable components which can be plugged into a web application. Creating a top level Jakarta Project for development and distribution of Servlet Filters will encourage reuse and minimize duplication of effort.

(1) Scope of the Package

(1.5) Interaction With Other Packages

Jakarta-Filters relies on:

(2) Initial Servlet Filter Contributions

The proposed package name for servlet filters is org.apache.commons.filters, with subpackages for each filter.

UploadFilter - Handles HTTP POST mime multipart file uploads and wraps the current request with a ServletRequestWrapper which includes methods for accessing date for the files uploaded. (Rich Catlett)

WorkingFilter - displays "Upgrade in Process" message to anyone accessing a url from outside of a configured set of IP addresses. Not sure how widely useful this is, but this allows us to update our code and make configuration changes through admin apps without concern for users. The "allowed IPs" lets us operate on the site while it is unavailable to visitors. (Lance Lavandowska)

CacheFilter - uses Cache from commons-sandbox to cache response byte arrays. Configure which directories to *not* cache. Currently in rough state. (Lance Lavandowska)

PerformanceFilter - outputs generation time and lots of other information over whatever requests it filters. (Serge Knystautas)

JTidyFilter - uses JTidy to clean up the HTML output and dumps the error messages at the bottom of the page. (Serge Knystautas)

RequiresSecureFilter - if request is insecure, invalidates session and redirects to https. (Serge Knystautas)

SynchronizationFilter - ugggly hack... synchronizes everything so only 1 request is handled at a time by anything this filter covers. (Serge Knystautas)

ReferrerFilter - simple filter that emails you when someone has clicked-through to your site from somewhere outside the excludes list... could be extended to allow custom actions. (Serge Knystautas)

GZipFilter - fitler equivalent of mod_gzip (Serge Knystautas)

CompressionFilter - gzip compression filter from Tomcat 4.

ExampleFilter - example Servlet 2.3 filter from Tomcat 4.

SetCharacterEncodingFilter - set character encoding filter from Tomcat 4.

RequestDumperFilter - dumps request information to the context log from Tocmat 4.

(3) Organization

The project will follow the pattern established by the Jakarta-Taglibs project to organize the Servlet Filters.

One or more filters can be organized logically into a single sub filter project.

Each sub filter project can be built separately and should create a war file with documentation and example usage.

Each sub filter will be made available as an individual download.

(4) Required Jakarta Resources

Initially the filters will reside in the jakarta-commons-sandbox SVN repository in the filters directory. The dev@commons.apache.org list will be used for discussions.

Once filters are ready for use the fitlers area from the sandbox will be made public via the commons area of the Jakarta web site.

After a few months an evaluation will be done to determine the strength of the community for Servlets Fitlers based both on interest by users and committers. At that time Jakarta-Commons commiters can discuss graduating the filters out of the sandbox or asking the Jakarta PMC to make it a top level project.

The following resources would be needed for a top level Jakarta project.

(5) Initial Committers

The initial committers for Jakarta-Filters shall be: