vipx / google-guice

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

Doen't work with caucho resin Websocket #792

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the issue:

Steps to reproduce:
1. Set up caucho resin
2. In servlet service add line:

final WebSocketServletRequest wsReq = (WebSocketServletRequest) req;

3. You get exception

WARNING: java.lang.ClassCastException: 
com.google.inject.servlet.ServletDefinition$2 cannot be cast to 
com.caucho.websocket.WebSocketServletRequest
java.lang.ClassCastException: com.google.inject.servlet.ServletDefinition$2 
cannot be cast to com.caucho.websocket.WebSocketServletRequest

Original issue reported on code.google.com by matterma...@gmail.com on 12 Dec 2013 at 1:26

GoogleCodeExporter commented 9 years ago
Just need to cast to HttpServletRequestWrapper...

Original comment by matterma...@gmail.com on 16 Dec 2013 at 1:50

GoogleCodeExporter commented 9 years ago
Try doing this instead:

ServletRequestWrapper servletRequest = (ServletRequestWrapper) req

WebSocketServletRequest wsReq = (WebSocketServletRequest) 
servletRequest.getRequest();

Original comment by rom...@gmail.com on 16 Dec 2013 at 1:50