tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 王琳 <benben_...@163.com>
Subject A question about websocket API-- Annotation ServerEndpoint
Date Thu, 08 Jun 2017 01:06:46 GMT
Hi friend:
 i have a question. use Tomcat 8.5.15
@ServerEndpoint API has 'value' summary. This value mapping url.When the url has parameter,use
{}.
for example:
@ServerEndpoint(value = "/websocket/fmsWebsocket/{userId}/{companyId}/{groupId}")

js:var url = "ws://192.168.0.6:8080/note/websocket/fmsWebsocket/1/1/1";

My question is when {userId} is null or {companyId} is null or {groupId} is null . How  write
@ ServerEndpoint(value=??????).
and
js: var url = "ws://192.168.0.6:8080/note/websocket/fmsWebsocket///1";
is right?

Thank you very much!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message