tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sierk Schmittner" <>
Subject Server push with Tomcat 6/Comet
Date Thu, 29 May 2008 11:53:37 GMT

I want to implement a server push mechanismus with Tomcat 6/Comet.

The use case is that a javascript client sends an AJAX request to the
server. The server is performing some internal asynchronous tasks (in
seperate threads). The result of these tasks should be pushed asynchronous
to the client over the existing connection.

I am using a Comet-based servlet and I'm facing two problems:
- When I write the data to the response's outputstream and call the flush
method, the data is only send to the client when there is a minimum amount
of bytes written on the outputstream. Is it possible to change this behavior
so that the data is send immediately?
- When the last task ist finished, its result should be send back to the
client and the connection should be closed. Is it possible to terminate the
connection on the server side? Or how can I trigger the Comet-End-Event?


Best regards,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message