Yea you're right that that is basically the problem. I'll look into this when I have some time later in the month. Any other volunteers? Dhanji.
On Mon, May 4, 2009 at 2:45 AM, tchan <[email protected]> wrote: > > All right, I took a stab at it and managed to find the problem but I > don't understand it well enough to fix it. > > In Tomcat, the forward to the referenced jsp will eventually be > serviced by the Jasper jsp servlet. When the target jsp is defined in > web.xml, it can just grab its path from that servlet definition entry > otherwise it has to be a request from RequestDispatcher. So if it's > an include, then there's a request attribute with the path already > otherwise for a forward, Jasper will call request.getServletPath() and > append getPathInfo() on it as needed. This is where the problem is. > > The request object here is a Guice wrapper object, specifically the > anonymous HttpServletRequestWrapper class inside > ServletDefinition.doService(). Its getServlePath() defers to > computePath() to figure out the servlet path and it *seems* to return > the servlet mapping of the original servlet rather than the servlet > path of the jsp forward. computePath() does defer to its super > (Tomcat) request object if it can't compute it itself and that wrapped > request object returns the right servlet path. > > So in short, the request wrapper in ServletDefinition has a bug that > trips jsp forwards in Tomcat. But I don't understand why it does what > it tries to do so I'll have to leave it to Dhanji to take a look at > it. > > On May 3, 8:51 am, tchan <[email protected]> wrote: > > I don`t mind taking a stab at ii if you can point me in the right > > direction. I tried debugging through Tomcat`s pipeline but that was > > too much for me (and I really couldn`t see a difference between the > > web.xml and GuiceFilter scenarios). > > > > On May 3, 12:25 am, "Dhanji R. Prasanna" <[email protected]> wrote: > > > > > > > > > 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. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
