I'm incrementally migrating our application servlets from web.xml to Guice servlet module and encountered problem with UrlRewrite filter (tuckey.org/urlrewrite/). It does not process servlets registered in Guice module. If I register both servlet and filter in web.xml everything works fine, but If I try to register them in Guice module - doesnt. Has someone encountered similar problem ?
Here are some excerpts from code :
1) Guice configuration module.
public class ServletConfigurationModule extends ServletModule {
@Override
protected void configureServlets() {
bind(UrlRewriteFilter.class).in(Singleton.class);
Map<String, String> urlRewriteParams = new HashMap<>();
urlRewriteParams.put("confReloadCheckInterval", "60");
urlRewriteParams.put("statusEnabled", "false");
filter("/*").through(UrlRewriteFilter.class, urlRewriteParams);
serve("/account").with(Account.class);
2) urlrewrite.xml contents
<rule>
<from>/affiliate-activation</from>
<to>/account?do=affiliate&trg=5</to>
</rule>
When I try to open url myhost/affiliate-activation I get 404 HTTP error.