Skip to content

Commit 93ad0fd

Browse files
author
Arun Gupta
committed
Using more meaningful messages
1 parent 3c4be8f commit 93ad0fd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

websocket/httpsession/src/main/webapp/index.jsp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,15 @@
4545
<html>
4646
<head>
4747
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
48-
<title>HttpSession in a WebSocket endpoint</title>
48+
<title>WebSocket : HttpSession</title>
4949

5050
</head>
5151
<body>
52-
<h1>HttpSession in a WebSocket endpoint</h1>
52+
<h1>WebSocket : HttpSession</h1>
5353

5454
<div style="text-align: center;">
5555
<form action="">
56-
<h2>Text Data</h2>
57-
<input onclick="sayHello();" value="Say Hello" type="button">
56+
<input onclick="echoText();" value="Echo Text" type="button">
5857
<input id="myField" value="WebSocket" type="text"><br>
5958
</form>
6059
</div>

websocket/httpsession/src/main/webapp/websocket.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ websocket.onerror = function(evt) { onError(evt) };
4747

4848
var output = document.getElementById("output");
4949

50-
function sayHello() {
51-
console.log("sayHello: " + myField.value);
50+
function echoText() {
51+
console.log("echoText: " + myField.value);
5252
websocket.send(myField.value);
5353
writeToScreen("SENT (text): " + myField.value);
5454
}

0 commit comments

Comments
 (0)