This project shows how to use the WebSocket Protocol with :
-
Java API for WebSocket (from Java EE 7 specifications)
-
WebSocket HTML 5 / Javascript API (from W3C)
-
AngularJS framework
-
deployed on WildFly 8.0.0-Beta1
There are 2 samples :
-
the first one (/index.html) which handle just one match and uses only native Javascript (client-side)
-
online demo : http://wildfly-mgreau.rhcloud.com/usopen/
-
local access : http://localhost:8080/usopen/
-
-
the second (/live.html) which is more complicated as it handles several matches and it uses AngularJS client-side solution
-
online demo : http://wildfly-mgreau.rhcloud.com/usopen/live.html
-
local access : http://localhost:8080/usopen/live.html
-
-
Clone this project :
git clone https://github.com/mgreau/javaee7-websocket
-
Start wildfly :
$JBOSS_HOME/bin/standalone.sh
-
Build the war and deploy it automatically with maven :
mvn clean package jboss-as:deploy
-
Launch your browser :
-
1 match : http://localhost:8080/usopen/index.html
-
multiples matches : http://localhost:8080/usopen/live.html
-