src/main/resources/static/application.js
/**
 * Send a message to the server. You could also submit user messages via the web
 * socket connection.
 * 
 * @param messageToSend
 *            the message to send
 */
Send a message to the server. You could also submit user messages via the web
socket connection.

@param messageToSend
the message to send
Send a message to the server . You could also submit user messages via the web socket connection . @param messageToSend the message to send
function sendMessage(messageToSend) {
    $.ajax({
        url : "/web-socket/submit-message",
        type : "POST",
        data : JSON.stringify({
            message : messageToSend
        }),
        contentType : "application/json",
        dataType : "json"
    });
}
function sendMessage ( messageToSend ) { $ . ajax ( { url : "/web-socket/submit-message" , type : "POST" , data : JSON . stringify ( { message : messageToSend } ) , contentType : "application/json" , dataType : "json" } ) ; }
Send a message to the server.
Send a message to the server .