Re: Configuring two connectors and COMET Read event

2010-02-04 Thread Stephen Byrne
Animesh Sonkar wrote: *snip* > 2. I am not able to invoke the READ event. How do i do that? You need to send the HTTP request as chunked data. If you happen to be using an HttpURLConnection, call setChunkedStreamingMode( 1 ). If you are taking a lower level approach, (i.e. using sockets), send a

RE: Configuring two connectors and COMET Read event

2010-02-04 Thread Caldarale, Charles R
> From: Animesh Sonkar [mailto:akson...@gmail.com] > Subject: Configuring two connectors and COMET Read event > > Now i also need two connectors to be setup in server.xml. Why do you think that? > One is a normal HTTP/1.1 connector and another a NIO connector. Why not just th

Configuring two connectors and COMET Read event

2010-02-04 Thread Animesh Sonkar
Hi, I am developing an alication where i need two servlets. One is a normal Http Servlet and another is a comet servlet. Now i also need two connectors to be setup in server.xml. One is a normal HTTP/1.1 connector and another a NIO connector. I made changes to the server.xml as follows. serve

Re: comet read event

2007-06-04 Thread Filip Hanik - Dev Lists
connector. Here is the config line from my server.xml: Are there any other configuration options I need to set? Peter Filip Hanik - Dev Lists wrote: and you are using the APR or the NIO connector right? Filip Peter Warren wrote: Thanks for the suggestion. I changed

Re: comet read event

2007-06-04 Thread Peter Warren
connectionTimeout="2" keepAliveTimeout="12" >> maxKeepAliveRequests="-1" acceptorThreadCount="2" redirectPort="8443" /> >> >> Are there any other configuration options I need to set? >> >> Peter >> >&

Re: comet read event

2007-06-04 Thread Filip Hanik - Dev Lists
u are using the APR or the NIO connector right? Filip Peter Warren wrote: Thanks for the suggestion. I changed the comet test servlet to read directly from the input stream as shown in the advanced io example. I'm still seeing the same behavior. No comet read event gets generated on

Re: [maybe not solved] comet read event

2007-06-02 Thread Filip Hanik - Dev Lists
println(line); out.close(); urlConn.disconnect(); } Peter Warren wrote: Thanks for the suggestion. I changed the comet test servlet to read directly from the input stream as shown in the advanced io example. I'm still seeing the same behavior. No comet read event g

Re: [maybe not solved] comet read event

2007-06-01 Thread Peter Warren
ln("test 2"); >> out.flush(); >> >> line = read(urlConn.getInputStream()); >> System.out.println(line); >> >> out.close(); >> urlConn.disconnect(); >> } >> >> >> Peter Warren wrote

Re: [solved] comet read event

2007-06-01 Thread Filip Hanik - Dev Lists
ks for the suggestion. I changed the comet test servlet to read directly from the input stream as shown in the advanced io example. I'm still seeing the same behavior. No comet read event gets generated on the server, only the begin event which contains the client's first message. The c

Re: [solved] comet read event

2007-06-01 Thread Peter Warren
ystem.out.println(line); out.close(); urlConn.disconnect(); } Peter Warren wrote: > Thanks for the suggestion. I changed the comet test servlet to read > directly from the input stream as shown in the advanced io example. I'm > still seeing the same behavior. No comet read event g

Re: comet read event

2007-05-23 Thread Peter Warren
e: >> Thanks for the suggestion. I changed the comet test servlet to read >> directly from the input stream as shown in the advanced io example. I'm >> still seeing the same behavior. No comet read event gets generated on >> the server, only the begin event which contains the

Re: comet read event

2007-05-23 Thread Filip Hanik - Dev Lists
and you are using the APR or the NIO connector right? Filip Peter Warren wrote: Thanks for the suggestion. I changed the comet test servlet to read directly from the input stream as shown in the advanced io example. I'm still seeing the same behavior. No comet read event gets generat

Re: comet read event

2007-05-23 Thread Peter Warren
Thanks for the suggestion. I changed the comet test servlet to read directly from the input stream as shown in the advanced io example. I'm still seeing the same behavior. No comet read event gets generated on the server, only the begin event which contains the client's first mes

Re: comet read event

2007-05-23 Thread Rémy Maucherat
On 5/23/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote: take a look at the documentation, the way you are reading it is incorrect. you need to take advantage of the available() method With a reader, it's ready(). Rémy

Re: comet read event

2007-05-23 Thread Filip Hanik - Dev Lists
take a look at the documentation, the way you are reading it is incorrect. you need to take advantage of the available() method Filip Peter Warren wrote: My BEGIN block in my comet servlet now looks like the code below (added a while loop to read until the buffer is empty). Is that what you ha

RE: comet read event

2007-05-23 Thread Reich, Matthias
Hi, I think you have to add cometEvent.getHttpServletResponse().getWriter().flush(); also in the READ event case. Matthias > -Original Message- > From: Peter Warren [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 22, 2007 10:11 PM > To: users@tomcat.apache.org > Subj

comet read event

2007-05-22 Thread Peter Warren
My BEGIN block in my comet servlet now looks like the code below (added a while loop to read until the buffer is empty). Is that what you had in mind? The buffer in the BEGIN event only contains the client's first message. Am I not emptying the buffer correctly? Although, I wouldn't expect the

Re: comet read event

2007-05-22 Thread Filip Hanik - Dev Lists
it could be because the data from the request already came in with the request. when the BEGIN happens, perform the actions as if there was a READ as well, ie, empty out the buffer. Filip Peter Warren wrote: The following client code generates a comet BEGIN event on the server but not a subse

comet read event

2007-05-22 Thread Peter Warren
The following client code generates a comet BEGIN event on the server but not a subsequent READ event, as I was expecting. How come? Is my code wrong? Are my expectations wrong? See sequence of events commented in code below. // client test method that sends messages to server and listens