Package javawebparts.filter

This package contains a number of servlet filters.


Interface Summary
AppAvailabilityBypassCheck This interface is the interface a class must implement to be used to do a bypass check.

Class Summary
AppAvailabilityFilter This filter allows for defining a time window for each day of the week during which the application is available.
CacheControlFilter This filter allows for setting cache control headers on requests to a webapp.
CharacterEncodingFilter This filter allows for setting the Content-Type header of a request to set the character encoding scheme.
CompressionFilter This filter allows for compressing the response from the server.
CompressionResStream This class is used to do compression.
CompressionResWrapper This class is used to do compression.
CrossSiteScriptingFilter This filter checks all incoming request parameters, as well as all attributes if desired, for any characters usually associated with cross-site scripting exploits.
DependencyConfig This class is a bean that represents a <dependency> element in the config file for the DependencyFilter.
DependencyFilter This filter is a very simple hybrid IoC (Inversion Of Control) implementation.
ElapsedTimeFilter This filter writes to the log a message at the end of every request to show the elapsed time for the request.
FilterHelpers This class contains static methods that are used by a number of different filters.
IPAccessControlFilter This filter rejects or allows a request based on the IP address it comes from.
JSCompressionFilter This filter does some simple javascript compressing in the response.
JSCompressionResStream This class is used to do compression.
JSCompressionResWrapper This class is used to do compression.
JSMin This class is used to do compression.
ParameterMungerFilter This filter can perform various operations on incoming parameters.
ParameterMungerResWrapper This class is a wrapper capable of doing various operations on the request parameters.
RequestRecorderFilter This is a filter that is used to record each incoming request and write it out to a CSV file.
SessionInactivityFilter This filter can test to see if a session has expired, and if it has can redirect or forward to a page of your choice.
SessionLimiterFilter This filter can be used to limit the number of concurrent sessions allowed by a webapp at any given time.
SessionLimiterFilterHelper This class contains static methods used by the classes implementing the session limiting facility.
URLRedirectFilter This filter allows you to redirect incoming requests to another URL based on requested URL.

Exception Summary

Package javawebparts.filter Description

This package contains a number of servlet filters. Many of them share some common init parameters which are documented here. Note that all filters use these parameters unless noted.

pathSpec and pathList
These together determine paths to included or excluded from a filters function.

pathSpec is one of two values, "include" or "exclude". When it is "include", then the pathList parameter names paths that the filter WILL operate on. When it is "exclude", then the pathList parameter names paths that the filter WILL NOT operate on.

In other words, while you will map your filter to some path as usual using the standard <filter-mapping> element in web.xml, you can further define paths to include or exclude for a given filter. For example, if you wanted to use the CacheControlFilter on everything in your webapp EXCEPT a GIF named MyImage, web.xml would look something like this:

  <filter-class>javawebparts.filter.CacheControlFilter </filter-class>
    <param-value>*/MyImage.gif </param-value>

Note that pathSpec (and it's accompanying pathList attribute) are required parameters. If you want the filter to operate on all paths, then the <filter-mapping> element should be as you see it above, and pathSpec should be "include" and pathList should be "*".

The pathList parameter names a list of paths in comma-separated form. So you can name as many as you wish (although for performance reasons you will want to keep the list as small as possible). Wildcards are supported. In reality, each item in the pathList is a regular expression, where the asterisk wildcard character gets converted to .* in the regex. So, in reality you can write any regular expression you want in pathList. Note however that commas are the list separater character, the list is broken up via a StringTokenizer, so you will not be able to use commas in it. Also note that any occurance of the asterisk character (*) will be converted to .*, so keep that in mind too.

This package depends on the following extra packages to compile and run: None.

Copyright 2005 Frank W. Zammetti