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
> 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
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
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
connectionTimeout="2" keepAliveTimeout="12"
>> maxKeepAliveRequests="-1" acceptorThreadCount="2" redirectPort="8443" />
>>
>> Are there any other configuration options I need to set?
>>
>> Peter
>>
>&
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
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
ln("test 2");
>> out.flush();
>>
>> line = read(urlConn.getInputStream());
>> System.out.println(line);
>>
>> out.close();
>> urlConn.disconnect();
>> }
>>
>>
>> Peter Warren wrote
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
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
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
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
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
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
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
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
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
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
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
19 matches
Mail list logo