i am giving my first shot at a simple echo comet servlet.
i have a simple webpage with a textarea in it, and a button.
when clicking on the button, i do an ajax request to a comet servlet and write
its response on the onsuccess ajax event in the textarea.
on the server side i have a comet servlet and a thread.
the thread has access to the list of the HttpServletResponses, and iterates
over it, and writes the message "hello", every 4 seconds.
all is ok, i see that i enter the begin event and the read event code.
the problem:
the write part gives no error, but the message doesn't reach the browser.
i do call flush on the servletoutputstream, but still nothing.
what i want is to call event.close() after i do
response.getoutputstream().write("hello");
and then initiate in the javascript code another request. this way i ensure the
message gets to the client.
but how can i get a reference to the event that corresponds to the
httpservletresponse that i have ?
there is no httpservletresponse.getCometEvent or something ...
i also played with buffering, suspecting this is the responsible. but actually
i don't really want to get the message to the client without closing the
processing of that request.
thank you in advance
gabi
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]