How should I go about creating filters that take parameters?

For example, I'm using the JSOS gzip filter and I want to have two
varieties of the filter, one with caching and one without, like this:

  <filter>
    <filter-name>GzipFilter</filter-name>
    <filter-class>com.cj.gzipflt.GzipFilter</filter-class>
    <init-param>
        <description>Folder to store a cache of compress file data</
description>
        <param-name>dir</param-name>
        <param-value>gzcache</param-value>
    </init-param>
    <init-param>
        <description>Minimum size file to compress</description>
        <param-name>minSize</param-name>
        <param-value>1000</param-value>
    </init-param>
    <init-param>
        <description>Time to keep the resource in the client's cache</
description>
        <param-name>expires</param-name>
        <param-value>3600</param-value>
    </init-param>
  </filter>
  <filter>
    <filter-name>GzipFilterNoCache</filter-name>
    <filter-class>com.cj.gzipflt.GzipFilter</filter-class>
    <init-param>
        <description>Minimum size file to compress</description>
        <param-name>minSize</param-name>
        <param-value>1000</param-value>
    </init-param>
  </filter>

Is this possible using the Guice ServletModule ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to