Skip to content

Commit ddbaa46

Browse files
committed
Sample is now working on WildFly
1 parent aa58fea commit ddbaa46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

websocket/chat/src/main/java/org/javaee7/websocket/chat/ChatEndpoint.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848
/**
4949
* @author Arun Gupta
5050
*/
51-
@ServerEndpoint("/websocket")
51+
@ServerEndpoint("/chat")
5252
public class ChatEndpoint {
5353
@OnMessage
5454
public void message(String message, Session client) throws IOException, EncodeException {
5555
for (Session peer : client.getOpenSessions()) {
56-
peer.getBasicRemote().sendObject(message);
56+
peer.getBasicRemote().sendText(message);
5757
}
5858
}
5959
}

0 commit comments

Comments
 (0)