Will javax.servlet.Filter intercept Websocket messages? (Java Servlet API)

后端 未结 2 1165
北恋
北恋 2020-12-17 03:54

When I have a websocket connection, say at \"/ws\"

Will a regular javax.servlet.Filter on the \"/ws\" path intercept each message as a regular http request? Will it

2条回答
  •  时光说笑
    2020-12-17 04:46

    Will it intercept only the first request (as part of the handshake?)

    Yes, only the first request, the one that initiates the WebSocket Handshake, is intercepted by the Servlet Filter.

提交回复
热议问题