<context-param> <param-name>javax.faces.ENABLE_WEBSOCKET_ENDPOINT</param-name> <param-value>true</param-value> </context-param>
To configure WebSockets for use in JSF web applications, first enable the
WebSocket endpoint using the context parameter in
If your server is configured to run a WebSocket container on a different TCP
port than the HTTP container, you can use the optional
WebSocket Usage: Client Side
When successfully connected, the WebSocket is open by default for as long as the document is open, and it will auto-reconnect, at increasing intervals, when the connection is closed, or aborted, as a result of events such as a network error or server restart. It will not auto-reconnect when the very first connection attempt fails. The WebSocket will be implicitly closed after the document is unloaded.
WebSocket Usage: Server Side
On the Java programming side, inject a
By default, the name of the channel is taken from the name of the variable into which the injection takes place.
Optionally, the channel name can be specified using the
The message object will be encoded as JSON and delivered as a message argument