RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-03 Thread Reich, Matthias
-Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Wouldn't every application which isn't as dumb as the chat example (which does not care about the content it reads but simply passes it back to it's clients) need to implement it's own mechanism to check

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-03 Thread Reich, Matthias
-Original Message- From: Rémy Maucherat [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 02, 2007 11:13 PM On 5/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: It's a race condition and the problem occurs quite infrequently (especially with small request bodies). The larger the

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-03 Thread Sebastiaan van Erk
Hi, I am working on a scenario with browsers as clients. The client does requests with JavaScript code like this: req = new XMLHttpRequest(); req.onreadystatechange = handler; req.open(post, /somecontext/somecometservlet/somerequest?param1=val1param2=val2 ); req.send(null); We

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Reich, Matthias
-Original Message- From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 7:24 PM To: Tomcat Users List Subject: Re: Comet: problem with request.getParameter() in Comet POST requests GET parameters, ie parameters in the URL will work. However

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Sebastiaan van Erk
Hi, Wouldn't every application which isn't as dumb as the chat example (which does not care about the content it reads but simply passes it back to it's clients) need to implement it's own mechanism to check whether there is enough input available to start parsing a chunk of data? Either

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Reich, Matthias
Wouldn't every application which isn't as dumb as the chat example (which does not care about the content it reads but simply passes it back to it's clients) need to implement it's own mechanism to check whether there is enough input available to start parsing a chunk of data?

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Rémy Maucherat
On 5/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: What you seem to want is more in line with the asynchronous servlet (request, wait, response), which Filip and Remy pointed out is not the quite the same as Tomcat's Comet. Ideally, both models would be possible through single unified API,

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Rémy Maucherat
On 5/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Sorry about that, did not mean to say it is not possible to do a request, wait, response with Comet. All I'm trying to say is that Comet was not designed (at least, Filip stated this) for the async servlet model, and I tried to point out

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Sebastiaan van Erk
Hi, How about not arguing about everything ? It is your fault when parameters are not processed. Tomcat will process parameters with comet. No, Comet will not process parameters in POST requests if you call getParameter() in the BEGIN event and the request body has not yet arrived.

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Filip Hanik - Dev Lists
Reich, Matthias wrote: -Original Message- From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 7:24 PM To: Tomcat Users List Subject: Re: Comet: problem with request.getParameter() in Comet POST requests GET parameters, ie parameters

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Peter Rossbach
Hi Am 02.05.2007 um 17:26 schrieb Sebastiaan van Erk: Hi, How about not arguing about everything ? It is your fault when parameters are not processed. Tomcat will process parameters with comet. No, Comet will not process parameters in POST requests if you call getParameter() in the BEGIN

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Sebastiaan van Erk
Hi, I have no problem to get POST parameter with NIO Connector at my begin.event. With APR connector I also have POST parameter problems. Strange! A my first request I get the POST parameter. The POST message close the event and I got an exception after the end event. It's a race

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Rémy Maucherat
On 5/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: It's a race condition and the problem occurs quite infrequently (especially with small request bodies). The larger the request body of the POST request, the more likely it is that the problem occurs. I was testing at a few thousand request

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-04-27 Thread Filip Hanik - Dev Lists
Sebastiaan van Erk wrote: Rémy Maucherat wrote: On 4/26/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, If the body of the POST request is not present at the time of the getParameter() call, it returns null even if the parameter value is set. Things don't work like this, obviously.

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-04-27 Thread Rémy Maucherat
On 4/27/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: GET parameters, ie parameters in the URL will work. However, using Comet you shouldn't rely on parameters in the body, the body if for you usage, and your usage alone. Seems to me that this is a pretty common use case though with AJAX

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-04-27 Thread Filip Hanik - Dev Lists
Rémy Maucherat wrote: On 4/27/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: GET parameters, ie parameters in the URL will work. However, using Comet you shouldn't rely on parameters in the body, the body if for you usage, and your usage alone. Seems to me that this is a pretty common use

Comet: problem with request.getParameter() in Comet POST requests

2007-04-26 Thread Sebastiaan van Erk
Hi, If the body of the POST request is not present at the time of the getParameter() call, it returns null even if the parameter value is set. How to reproduce: 1) Send the headers of a POST request to the CometProcessor. 2) in the event() method of the CometProcessor use getParameter(); it

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-04-26 Thread Rémy Maucherat
On 4/26/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, If the body of the POST request is not present at the time of the getParameter() call, it returns null even if the parameter value is set. Things don't work like this, obviously. Parameter parsing only occurs if nothing used

Re: Comet: problem with request.getParameter() in Comet POST requests

2007-04-26 Thread Sebastiaan van Erk
Rémy Maucherat wrote: On 4/26/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, If the body of the POST request is not present at the time of the getParameter() call, it returns null even if the parameter value is set. Things don't work like this, obviously. Parameter parsing only occurs