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