How can a servlet-based application detect and handle WebSocket upgrade requests?

  • By inspecting the payload
  • Using the Connection header
  • Using the Upgrade header
  • WebSockets cannot be used with servlets
A servlet-based application can detect and handle WebSocket upgrade requests by inspecting the Upgrade header in the HTTP request, indicating the intention to switch protocols to WebSocket.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *