dev@grizzly.java.net

Re: need ServletAdapter.addFilter with Initparam example

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Wed, 11 Feb 2009 11:18:07 +0100

Hi,

>
> I need some help to complete a demo. I saw that we can pass a
> initParamMap to the addFilter.. but what do I put in the map ?
You can put any Filter dependent values. For example path to some
resources, timeout values etc.

>
> example
>
> <init-param>
>
> <param-name>myInitParam</param-name>
> <param-value>myInitParamValue</param-value>
> </init-param>
>
> sa.addFilter(filter, filterType.getFilterName().getValue(), map);

Map has String key and String value. In your case map will have key:
myInitParam with correspondent myInitParamValue value.

> and how that will be use in the filter ?

It depends on Filter implementation. It's just the way, how Filter
could be configured without recompiling.

WBR,
Alexey.