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.
Loading...
Related Quiz
- What is the scope of servlet initialization parameters?
- If a filter needs to perform different actions based on whether the request is an HTTP GET or POST, where should this logic be implemented?
- In an MVC framework, a servlet often delegates business logic processing to __________.
- To prevent XSS attacks, it is essential to _________ user input and _________ user output.
- _________ is a strategy where new instances of the application are launched in different geographic locations to handle traffic.