I have a problem and I don't know if it's a bug or I'm doing something wrong.
I have 2 servlets. Both are mapped in the ServletModule in my GuiceServletContextListener:
serve("/", "/index.jsp").with(MainEntryServlet.class);
serve("/foobar.jsp").with(FooBarServlet.class);
In my FooBarServlet I do the following:
String url = "/index.jsp?target=foo.jsp";
request.getRequestDispatcher(url).forward(request, response);
The MainEntryServlet gets called as expected, but the parameter target is missing in the request parameters. This only occurs when forwarding from one servlet to another. If I forward the request to a JSP everything works fine.
When I map the servlets in the web.xml instead of the ServletModule, the target parameter is not missing. So I guess that Guice is causing the problem. I'm using Tomcat 8 as servlet container.
Any idea how to fix this?