java - tomcat 8 javax.websockets doesn't work -


i have tomcat 8-rc1 installed in order use javax.websockets write websocket based applications.

there examples @ http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/web-inf/classes/websocket/ show structure of websocket class implemented following interface:

public interface xpowebsocket {  @onopen public void onopen(session session);  @onclose public void onclose();  @onmessage public void ontextmessage(string message);  public session getsession();  } 

in line above class deceleration included following:

@serverendpoint(value = "/servconnect") public class servconnect implements xpowebsocket { ... 

so serverendpoint point how access websocket, question need set in web.xml ? web socket still not accessible.

i try define servconnect regular servlet in web.xml doesn't work. time out when try access servconnect location.

what configuration missing let servconnect websocket class work ?

the websocket spec says have annotate concrete class. servconnect treated websocket endpoint not receive events annotations on interface ignored.

i'd suggest getting own version of echo example working , expanding there.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -