-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFLY-19391] thread-racing Quickstarts should have a root webpage sim…
…ilar to helloworld
- Loading branch information
1 parent
01313ed
commit 526ea0d
Showing
2 changed files
with
68 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,30 @@ | ||
<!-- | ||
JBoss, Home of Professional Open Source | ||
Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual | ||
Copyright 2024, Red Hat, Inc. and/or its affiliates, and individual | ||
contributors by the @authors tag. See the copyright.txt in the | ||
distribution for a full listing of individual contributors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@@ -15,95 +13,21 @@ | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- Plain HTML page that kicks us into the app --> | ||
|
||
<html lang="en"> | ||
<head> | ||
<title>Jakarta EE Thread Racing</title> | ||
<script type="text/javascript"> | ||
function letsRace() { | ||
var output = document.getElementById("output"); | ||
document.getElementById("raceButton").disabled = true; | ||
output.innerHTML = ''; | ||
var host = window.location.host; | ||
var wsProtocol = window.location.protocol == "https:" ? "wss" : "ws"; | ||
var url = wsProtocol + '://' + host + window.location.pathname + 'race'; | ||
var ws = new WebSocket(url); | ||
ws.onmessage = function (message) { | ||
output.innerHTML += message.data; | ||
} | ||
ws.onclose = function (message) { | ||
document.getElementById("raceButton").disabled = false; | ||
} | ||
} | ||
</script> | ||
<style type="text/css"> | ||
body{ margin-left: 20px} | ||
</style> | ||
<meta charset="UTF-8"> | ||
<title>thread-racing</title> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>Jakarta EE Thread Racing</h1> | ||
<p>The GREATEST open source racing application ever developed, all for FREE, including TV live broadcast.</p> | ||
<p>A race where 4 threads run() for glory, completing different stages, each sponsored by a new or updated Jakarta EE technology!</p> | ||
<form action=""> | ||
<input id="raceButton" onclick="letsRace();" value="INSERT COIN" type="button"> | ||
</form> | ||
<br /> | ||
<div id="output"></div> | ||
<div style="text-align:center"> | ||
|
||
<h1>Hello There! Welcome to WildFly!</h1> | ||
<h2>The thread-racing application has been deployed and running successfully.</h2> | ||
<a href="welcome.html" title="Go to the application">Access the Jakarta EE thread-racing web application here</a> | ||
|
||
</div> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!-- | ||
JBoss, Home of Professional Open Source | ||
Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual | ||
contributors by the @authors tag. See the copyright.txt in the | ||
distribution for a full listing of individual contributors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Jakarta EE Thread Racing</title> | ||
<script type="text/javascript"> | ||
function letsRace() { | ||
var output = document.getElementById("output"); | ||
document.getElementById("raceButton").disabled = true; | ||
output.innerHTML = ''; | ||
var host = window.location.host; | ||
var wsProtocol = window.location.protocol == "https:" ? "wss" : "ws"; | ||
var url = wsProtocol + '://' + host + window.location.pathname + '/../race'; | ||
var ws = new WebSocket(url); | ||
ws.onmessage = function (message) { | ||
output.innerHTML += message.data; | ||
} | ||
ws.onclose = function (message) { | ||
document.getElementById("raceButton").disabled = false; | ||
} | ||
} | ||
</script> | ||
<style type="text/css"> | ||
body{ margin-left: 20px} | ||
</style> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>Jakarta EE Thread Racing</h1> | ||
<p>The GREATEST open source racing application ever developed, all for FREE, including TV live broadcast.</p> | ||
<p>A race where 4 threads run() for glory, completing different stages, each sponsored by a new or updated Jakarta EE technology!</p> | ||
<form action=""> | ||
<input id="raceButton" onclick="letsRace();" value="INSERT COIN" type="button"> | ||
</form> | ||
<br /> | ||
<div id="output"></div> | ||
</div> | ||
</body> | ||
</html> |