I am attempting to update a legacy Guice application, and I was wondering 
if there is any sort of preferred way of doing things when taking Servlet 
3.0 annotations into consideration. For example, my application has a 
filter, FooFilter, which is defined in the Guice Module Factory method 
configureServlets(), as follows:

    Map<String, String> fooParams = new HashMap<String, String>();
    fooParams.put("someParam", "parameter information");                        
      
    filter("/foo.jsp","/foo/*").through(com.example.filter.FooFilter.class, 
fooParams);

Is the above binding still necessary, or will it interfere with the 
following using the @WebFilter Servlet 3.0 annotation:

    @Singleton
    @WebFilter(
        filterName="FooFilter",
        urlPatterns={"/foo.jsp", "/foo/*"},
        initParams = {
                    @WebInitParam(name="foo", value="Hello "),
                    @WebInitParam(name="bar", value=" World!")
                 })
    public class FooFilter implements Filter {
    etc....

Which method is now preferred? Will they mess with each other?
If you are a StackOverflow user, you can collect a bounty here:

http://stackoverflow.com/questions/19872236/servlet-3-0-annotations-in-conjuction-with-guice

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to