I have tomcat 8-RC1 to use javax.websockets to write websocket based applications.
there are examples at http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/ that accurately display the structure of the websocket class, so I implemented the 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 the line above the class slowdown, I also included the following:
@ServerEndpoint(value = "/ServConnect") public class ServConnect implements XpoWebSocket { ...
so ServerEndPoint indicates how to access websocket, the question is what do I need to install in web.xml? while the web socket is still unavailable.
I am trying to define ServConnect as a regular servlet in web.xml, but this does not work. this is just the time when I try to access a ServConnect location.
what configuration am i missing for this ServConnect web class class to work?
source share