This application presents Dart Echo sample. The user sends a text message, server concatenates text " (from your server)" to the message and sends it back.
The application utilizes endpoint org.glassfish.tyrus.sample.echo.EchoEndpoint
to receive messages, add
the text and send it back.
Java part is exactly the same as in echo sample, only html page / javascript differs. Instead of pure Javascript, WebSocket connection is created by Dart runtime. By default dart.js is included; feel free to edit index.html and replace it with native dart script.
Run the example as follows: deploy:
$AS_MAIN/bin/asadmin start-domain
$AS_MAIN/bin/asadmin deploy ./target/*war
From a web browser, visit:
http://localhost:8080/sample-echo-dart
Run the example as follows:
mvn clean test-compile exec:java
From a web browser, visit:
http://localhost:8025/index.html