Il 12/01/2015 22:08, Michael Dykman ha scritto:
There is nothing to prevent you from using ... contextHandler.addFilter(MyFilter.class, "a/*", EnumSet.of(DispatcherType.REQUEST)); contextHandler.addFilter(MyFilter.class, "b/*", EnumSet.of(DispatcherType.REQUEST)); ... Well this is not completely true (at least based on my experience). What happens here is that each time i add a path the init() method of the filter is called again. So if i add 10 paths the init() method is called 10 times. And I do not know if this is the intended behaviour, since it does not happen when using the web.xml configuration where the filter is created and initialized only once even if i add 10 paths. So now what i would like to understand is: did I create 10 filters (one for each path) or create only one filter inited ten times over each path as intended? The strange thing is that at runtime only one doFilter() is called but I am not sure about what is happening in memory. Any hints? Thanks. Andrea.
_______________________________________________ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users