System.out.println in java websockets is not working.
My aim is on user connects it should send first 'welcome' and then the chat have to be started.
This is tomcat7 websockets chat example:
@OnOpen
public void start(Session session,@PathParam("client-id") String clientId) {
nickname = clientId;
this.session = session;
connections.add(this);
System.out.println("welcome");
String message = String.format("* %s %s", nickname, "has joined.");
broadcast(message);
}
But it is not printing 'Welcome' to user.
Help me.