-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Bob,
On 3/4/14, 2:39 PM, Bob Mancarella wrote: > Just using the EchoAnnotation code > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // client code > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > if (window.location.protocol == 'http:') > { // target = 'ws://' + window.location.host + '../websocket/ > connect.ws'; target = 'ws://' + window.location.host + > '/inlook/websocket/ connect.ws'; } else { target = 'wss://' + > window.location.host + '../websocket/ connect.ws'; } if > ('WebSocket' in window) { ws = new WebSocket(target); } else if > ('MozWebSocket' in window) { ws = new MozWebSocket(target); } else > { alert('WebSocket is not supported by this browser.'); return; } > ws.onopen = function () { console.log('onopen'); }; ws.onmessage = > function (event) { console.log('onmessage start'); }; ws.onclose = > function () { console.log('onclose'); }; > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > // server code > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > @ServerEndpoint("/websocket/echoAnnotation") > public class EchoMessage { @OnOpen public void onOpen(Session > session) { System.out.println("New connection with client"); } > > @OnMessage public void echoMessage(Session session, String msg) { > System.out.println("echoTextMessage: " + msg); } > > @OnClose public void onClose(Session session) { > System.out.println("Close connection for client"); } > > @OnError public void onError(Throwable exception, Session session) > { System.out.println("Error for client"); } > > } So both your client and server code do absolutely nothing. Where are you actually sending a message? What events do you see occurring? You are providing very little information, here. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFjGQAAoJEBzwKT+lPKRYrxAQAMeqEASzf5kjKeb8mA/G6PoC 4ZSlKEdzvHjZ6WogB2+zDsTrAB2qz7wkruCa+Vfwa1dEmbR+PgV96/PtfkrYyWrY FR0Hq+sf2+tVHcAUiQEbo/g33UTVj4dGVJCcJkeinnsBIwHueH+nlielyYS1FGt1 BqFJ7AuC6GxrgDHrAm+fh+5wJGWPO2WxtMSRjEO4M0H/S7FCr+UqPlqrBpBwTKlc UEuBCMfqzhdbRLpQciI7ZAaLN+8Wak4NyNp2e6+wr1WIRO9l3hlu8OYQYLTOCmm2 DfNG3oGWx3l9FZvnSq6GvJ96pw74G2TLSCaj9cGZL/BkCsWDTQvONVn/tmwKAuMh FumyuqPhlVdnMLZBcd0MxCNbuY8MdY5G8Cda3KJtBsLtkwGUeifQVRrmKKOUJ9OS 79oSW2zmLs110XfTXgjYeGs4YMg7+WxNAHJzQmKuRcyKk3/9d2onv+4p9dwrmMy+ x1m8yR1YnPtkR2dI2BSZfdnPttWOsCLshmx2f1AaFA5VJ9XFC4Nb3bJxbSTBx52f dap6urFuggIa9RKsHL3MDmL91U4gnuyTAbkAhapdpxTinQjpng+lBv07DGhCGIFc /8B3zOrdgjB1VNJJmZPswdOLpdQpmVkHN3Gj5unT2lSzjv3Y6j+vxX0NbWkUU2Bj TnakA5hZfnXWTnAaZ2Jx =+Pb5 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org