Configure the Liberty profile for WebSockets
We can configure the Liberty profile to use the WebSocket protocol to enable applications to communicate using a full duplex connection.
To configure a Liberty server to run an application enabled for WebSocket 1.0, set the websocket-1.0 feature.
Update server.xml to add the feature under the featureManager tag. For example:
WebSocket 1.0:
<featureManager> <feature>websocket-1.0</feature> </featureManager>Optionally, we can configure other features in addition to WebSockets; for example:
<featureManager> <feature>websocket-1.0</feature> <feature>jsp-2.2</feature> </featureManager>
What to do next
After configuring the Liberty profile for WebSockets, we are ready to deploy and start the web application containing the WebSocket code. Start the application in the same way that you start a standard web application.
Parent topic: