我试图与两个用户进行简单的聊天项目
但是我得到了例外
javax.servlet.ServletException: javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to using the same path [/websocket]
in catalina.out
这是我的源文件内容
@ServerEndpoint("/websocket")
public class ChatEndPoint {
@OnMessage
public void message(String message, Session session) throws IOException, EncodeException {
//processed the message
}
}
我在服务器上运行eclipse kepler上的项目,在ubuntu 13.10上使用oracle java 7
已经尝试过清理现有的tomcat项目,但问题仍未解决。
我该怎么做才能解决此类错误。
这是我第一次使用WebSockets