dev@woodstock.java.net

Re: ? on upload filter init params

From: Ratnadeep Bhattacharjee <Ratnadeep.Bhattacharjee_at_Sun.COM>
Date: Wed, 24 Oct 2007 16:26:25 -0400

Bob Yennaco wrote:
>
> If I have the following filter config in web.xml
>
> <filter>
> <filter-name>UploadFilter</filter-name>
> <filter-class>com.sun.webui.jsf.util.UploadFilter</filter-class>
> <init-param>
> <param-name>maxSize</param-name>
> <param-value>1000000</param-value>
> </init-param>
> </filter>
>
> Then can someone tell me what interface I need to use from my app to get
> access to the maxSize parameter? If I can get ahold of the
> javax.servlet.FilterConfig, then I can call getInitParameter("maxSize")
> on it and I'm in business, right? So then how do I get access to the
> FilterConfig? I would have thought that UploadFilter would have a
> getFilterConfig() method but it doesn't. Even if it did, how would I
> get a handle to the UploadFilter object?
>

AFAIK, you can access the filter parameters from the filter
implementation class only. You could access these values in your
filter's init() method and then do stuff like appending them to the URL
you are forwarding to...

-Deep.

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>