Hi Dhanji,

I don't know why it needs a name. It's a Wicket thing. I'm sure there
must be a good reason for this.

I tried to override the Key.toString() method but it's declared as
final.

Any ideas?

Regards,
-- Cafesolo



On Aug 21, 2:48 am, "Dhanji R. Prasanna" <[email protected]> wrote:
> Why does it need a name in order to work?
> By default we just provide Key.toString() as the name of the filter...
>
>
>
> On Fri, Aug 21, 2009 at 3:05 PM, Cafesolo <[email protected]> wrote:
>
> > Hi everyone!
>
> > I'm trying to configure a servlet filter using a ServletModule instead
> > of the web.xml file, and I need to specify a name for it. This is my
> > current XML configuration:
>
> >        <filter>
> >                <filter-name>wicketFilter</filter-name>
>
> >  <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-
> > class>
> >                <init-param>
> >                        <param-name>applicationClassName</param-name>
> >                        <param-value>com.example.MyApplication</param-value>
> >                </init-param>
> >        </filter>
> >        <filter-mapping>
> >                <filter-name>wicketFilter</filter-name>
> >                <url-pattern>/app/*</url-pattern>
> >        </filter-mapping>
>
> > And this is as far as I got with the ServletModule class:
>
> > class MyServletModule extends com.google.inject.servlet.ServletModule
> > {
>
> >       �...@override protected void configureServlets() {
> >                bind(WicketFilter.class).in(Scopes.SINGLETON);
> >                filter("/app/*").through(WicketFilter.class);
> >        }
>
> > }
>
> > As you can see, I'm not specifying a name for this filter (i.e.
> > "wicketFilter"), and I can't find a way to do it. The WicketFilter
> > class needs a name in order to work.
>
> > Is it possible to specify a name for a filter using the ServletModule
> > class?
>
> > Regards,
> > -- Cafesolo
--~--~---------~--~----~------------~-------~--~----~
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