yea this is a known problem, I just have not had any time to address it =( If you would like to contribute a patch we would be thrilled! Otherwise I hope to get to this problem soon.
Dhanji. On Sun, May 3, 2009 at 1:56 PM, tchan <[email protected]> wrote: > > Hi; > > I'm playing around with the guice-20090205 snapshot build and am > having problems getting jsps to work when using the GuiceFilter > approach to map servlet requests. > > I have a servlet that forwards to a jsp like this: > > req.getRequestDispatcher( "/WEB-INF/jsp/test.jsp" ).forward( req, > res ); > > If I hook up this servlet in web.xml using a servlet mapping, it works > as expected. When I take out the servlet mapping, put in a /* filter > mapping for GuiceFilter and add a listener definition for my own > implementation of GuiceServletContextListener, my servlet container > will fail to find the referenced jsp and return a 404 instead. > > Before with web.xml: > <servlet-mapping> > <servlet-name>TestServlet</servlet-name> > <url-pattern>/test</url-pattern> > </servlet-mapping> > > After with ServletModule in my context listener class: > @Override protected void configureServlets() > { > bind( TestServlet.class ).asEagerSingleton(); > serve( "/test" ).with( TestServlet.class ); > } > > My servlet code does get called and I can see that the call to > getRequestDispatcher() goes into ManagedFilterPipeline.withDispatcher > () in an attempt to find a Guice controlled servlet before delegating > upwards to my servlet container. And this is the same code path using > either the web.xml or ServletModule approach, I just can't figure out > why the latter would fail to find/load the jsp file. > > Has anyone else seen this or have been able to get jsps working with > Guice? I am using Tomcat 6.0.18 on OSX with jre 1.6 if it matters. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
