Java EE 7 Application Developer — Question 5

Which statement is true about the relationship between HTTP and WebSockets?

Answer options

Correct answer: D

Explanation

The correct answer is D because WebSocket connections begin with an HTTP handshake, establishing an initial connection before upgrading to a full-duplex communication channel. Option A is incorrect as it misrepresents the nature of the connection; it is not just a session but an upgrade. Option C is misleading because the client must initiate the handshake, while option B is incomplete as it doesn't mention the upgrade process that follows the handshake.