xiaodududu / google-guice

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

RequestWrappers don't work with Servlet Extension #596

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a Filter wrapping every request in my Servlet Application in some 
request wrapper (let's call it SpecialWrapper, extending 
HttpServletRequestWrapper). When I cast the HttpServletRequests back to 
SpecialWrapper somewhere down the filter chain I get:

java.lang.ClassCastException: com.google.inject.servlet.ServletDefinition$2 
cannot be cast to net.my.app.servlets.SpecialWrapper
    at net.my.app.servlets.SomeRandomServlet.doGet(SomeRandomServlet.java:75) 

Original issue reported on code.google.com by martin.k...@gmail.com on 28 Jan 2011 at 2:06

GoogleCodeExporter commented 9 years ago
I am using Guice + ServletExtension from Maven Central, so that would be 
3.0-rc2.

Original comment by martin.k...@gmail.com on 28 Jan 2011 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 22 Feb 2011 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 27 Sep 2011 at 5:01