Executing built-in HTTP server with comets
3 answers
Java6 has a simple built-in http server.
http://java.sun.com/javase/6/docs/jre/api/net/httpserver/spec/index.html
+2
source to share
StreamHub Push Server is a comet server written in Java. you can use it like a JAR to push it onto your stack. It also acts as a simple HTTP server. It is not integrated with dojo.io, but there are many good examples using a simple javascript library.
var hub = new StreamHub();
hub.connect("http://localhost:7979/");
hub.subscribe("MyTopic", function(topic, json) {
alert("got update on topic: " + topic + " MyField=" + json['MyField']);
});
// ...
Oh, and for a good tutorial, try Getting Started with StreamHub and Comets .
+3
source to share
Jetty supports asynchronous servlet continuations and comet-style programming. See the documentation index . It can also be easily run in another Java application.
+2
source to share