users@grizzly.java.net

Re: need ServletAdapter.addFilter with Initparam example

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 06 Feb 2009 12:50:23 -0500

Salut,

switching list.

Survivant 00 wrote:
> 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 ?
>
> example
>
> **<init-param>
>
> <param-name>myInitParam</param-name>
> <param-value>myInitParamValue</param-value>
> </init-param>
> **
>
>
> sa.addFilter(filter, filterType.getFilterName().getValue(), map);
>
> and how that will be use in the filter ?

The Filter will get those value using the FilterConfig element. So what
you need to do is to create a Map and store the init-param in it, and
pass it.

Thanks!

-- Jeanfrancois