Kelcio Barreto created MYFACES-4288:
---------------------------------------
Summary: Tag <f:websocket> does not work as expected
Key: MYFACES-4288
URL: https://issues.apache.org/jira/browse/MYFACES-4288
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.3.3
Reporter: Kelcio Barreto
Attachments: poc.zip
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:
{code:java}
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{code}
The maven project is attached.
*Reproduction steps:* Deploy it on a Tomcat 9.0.17 and access
http://localhost:9090/poc/hello.xhtml
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)