JSF/Websocket address and how it is determined? -


ive added websocket class [1] own jsf project, javascript unable connect websocket address.

the netbeans tutorial uses:

var wsuri = "ws://" + document.location.host + document.location.pathname +   "whiteboardendpoint"; 

which results in:

ws://localhost:8080/whiteboard_2/whiteboardendpoint 

or 1 different example:

var wsuri = "ws://" + window.location.host + "whiteboardendpoint"; 

which results in same address/resource above.

question 1)
annotate class this:

@serverendpoint(value="/whiteboardendpoint" 

and automatically opens websocket server endpoint or need else? because dont see other vital information open websocket in netbeans project.

question 2) (not programming related)
there way list open websocket resources on windows machine, maybe in netbeans?

i easier longer code snippets use [code][/code] on other pages instead of indentation btw.

[1] https://netbeans.org/kb/docs/javaee/maven-websocketapi.html


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -