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
Post a Comment