xiaodududu / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

RequestDispatcher fails to handle properties #622

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attached minimal example to reproduce issue.

Steps to reproduce
1) unzip dispatch-forward.zip -ddispatchtest
2) cd dispatchtest/gis-app
3) mvn -pl webapp jetty:run
4) http://localhost:8080/webapp/ (Note: variable does not resolve)
5) Click Links->Direct           (Note: variable resolves)

Culprit code:
request.getRequestDispatcher("/template/test.form.vm").forward(request, 
response);

Navigating to the /template/test.form.vm works fine. However if we navigate 
through the proxy servlet, then the page fails to resolve an attribute 
contained in ServletConfig.

Original issue reported on code.google.com by tj.rothw...@gmail.com on 7 Apr 2011 at 5:40

Attachments:

GoogleCodeExporter commented 9 years ago
If you're able to write a test in unit-test form, or some automated form that 
can be run during JUnit, it will be much easier to fix & confirm it stays fixed.

Original comment by sberlin on 7 Apr 2011 at 5:49

GoogleCodeExporter commented 9 years ago
Sam, I agree that unit-tests should be created. However there is a level of 
investigation that must occur to determine what underlying features of 
javax.servlet are failing for Apache Velocity when dispatcher forwarding is 
used.

Original comment by tj.rothw...@gmail.com on 7 Apr 2011 at 7:03

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
TJ -

I just wrote a post concerning this problem to the google-guice group. 
Situating the VVServlet in web.xml works in simple cases, but if you define 
filters and/or wrappers in your ServletModule the output from the VVServlet is 
corrupted. Here is a URL for the post:

http://groups.google.com/group/google-guice/browse_thread/thread/fc3b2168125f9c7
b#

may not be all filters/wrappers but the ones I am defining work in other 
webapps sans Guice.

May not be all filters

Original comment by garey.mi...@gmail.com on 4 May 2011 at 6:32