0

I have created websocket using spark 2.5 runs on jetty 9 server

on client side URI looks like in websocket client : ws://localhost:8004/myservice/clientid

on Server Websocket , @websocketconnect i want to build logic using 'clientid'

How to capture the path param in jetty 9 websocket?

prateem tadas
  • 33
  • 1
  • 6

2 Answers2

1

I'm late to answering this, but I came across this as well. It looks like session.getUpgradeRequest().getRequestURI() provides the full path. You can split it up and get anything that comes after myservice/... to get your clientid variable.

Keenan Thompson
  • 196
  • 1
  • 10
0

Map with all your parameter and corresponding value. session.getUpgradeRequest().getParameterMap()

Beeti Sushruth
  • 321
  • 2
  • 12