Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Cannot Reproduce
-
2.3.3
-
None
-
None
-
None
Description
Hi folks,
I have a tiny project which uses JSF 2.3, CDI and Tomcat 9.0.17.
I am trying to use <f:websocket> for the first time. I am using @Inject @Push in an application scoped bean.
I put an Observer to monitor the WebSocket events and I could realize that the socket is never being opened.
That is what I could realize when I access the page which contains the WebSocket tag:
EndpointImpl class - onOpen method:
config.getUserProperties().get(WebsocketConfigurator.WEBSOCKET_VALID) is always false.
WebsocketConfigurator class - modifyHandshake method:
websocketSessionBean is always being null, therefore WEBSOCKET_VALID is always being false.
I think it is important to mention that when I use javax.faces (from Glassfish) it works perfectly. However, I am working on a huge project which uses MyFaces, so I have to continue using it.
My dependencies in pom.xml are:
myfaces-api: 2.3.3 myfaces-impl: 2.3.3 tomcat-catalina: 9.0.17 weld-servlet-shaded: 3.1.0.Final cdi-api: 2.0 primefaces: 7.0 javax.websocket-api: 1.1
The maven project is attached.
Reproduction steps: Deploy it on a Tomcat 9.0.17, access http://localhost:8080/poc/hello.xhtml and click the button in the page.