Previous Topic: ProxyFilterException Class

Next Topic: Filter API Example

Implement a Filter

Filters that use the session key depend on the session scheme to define the key. To make the session key available to a filter, an attribute keyed by SessionScheme.DEFAULT_SESSION_KEY_NAME must be set to hold the value of the key when it is created by the createKeyFromRequest(..) callback and retrieved on subsequent requests by the getKeyFromRequest(..) callback of the Session Scheme API.

Out-of-the-box session schemes that generate the session key are:

To implement a filter using the Filter API

  1. Review the sample code for filters in Filter Examples.
  2. Write source code for your filter.
  3. Ensure that your system CLASSPATH includes the following:
  4. Compile the filter.
  5. Do one of the following:
  6. Configure the SPS server.conf file.
  7. Edit the proxyrules.xml file for the rule that is expected to implement the filter. For example:
    <nete:forward filter="your filter name">http://FQDN$0</nete:forward>
  8. Restart the SPS.