Dart Echo Sample

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.

Contents

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.

Running the Example with Glassfish

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

Running the Example with Grizzly

Run the example as follows:

mvn clean test-compile exec:java

From a web browser, visit:

http://localhost:8025/index.html