comet question

2014-05-29 Thread Elias Kopsiaftis
Hey guys,

I found this on the web, and it really alarms me because my web app which
is in development depends on Comet technology to work.

http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_sends_data_to_a_wrong_user.html

Before I start digging into the tomcat7 source code, can anyone verify or
contest the issue on that site? If Comet is not 100%
dependable, how about WebSockets as an alternative?


Re: comet question

2014-05-29 Thread Elias Kopsiaftis
oh yea, im on tomcat 7 btw


On Thu, May 29, 2014 at 2:13 PM, Elias Kopsiaftis yemi...@gmail.com wrote:

 Hey guys,

 I found this on the web, and it really alarms me because my web app which
 is in development depends on Comet technology to work.


 http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_sends_data_to_a_wrong_user.html

 Before I start digging into the tomcat7 source code, can anyone verify or
 contest the issue on that site? If Comet is not 100%
 dependable, how about WebSockets as an alternative?



Re: comet question

2014-05-29 Thread David kerber

On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:

oh yea, im on tomcat 7 btw


Then why are you asking about a problem in a very old version of Tomcat 6?





On Thu, May 29, 2014 at 2:13 PM, Elias Kopsiaftis yemi...@gmail.com wrote:


Hey guys,

I found this on the web, and it really alarms me because my web app which
is in development depends on Comet technology to work.


http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_sends_data_to_a_wrong_user.html

Before I start digging into the tomcat7 source code, can anyone verify or
contest the issue on that site? If Comet is not 100%
dependable, how about WebSockets as an alternative?






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: comet question

2014-05-29 Thread Elias Kopsiaftis
To make sure it doesnt exist in Tomcat7. Thats why. Ive never looked into
the tomcat source code and theres no point for my current project unless
this bug still exists. Just trying to save myself the work. Also, I couldnt
find a page of known tomcat7 comet issues. If such a page existed it would
be helpful


On Thu, May 29, 2014 at 2:45 PM, David kerber dcker...@verizon.net wrote:

 On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:

 oh yea, im on tomcat 7 btw


 Then why are you asking about a problem in a very old version of Tomcat 6?





 On Thu, May 29, 2014 at 2:13 PM, Elias Kopsiaftis yemi...@gmail.com
 wrote:

  Hey guys,

 I found this on the web, and it really alarms me because my web app which
 is in development depends on Comet technology to work.


 http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_
 sends_data_to_a_wrong_user.html

 Before I start digging into the tomcat7 source code, can anyone verify or
 contest the issue on that site? If Comet is not 100%
 dependable, how about WebSockets as an alternative?




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: comet question

2014-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

David,

On 5/29/14, 2:45 PM, David kerber wrote:
 On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:
 oh yea, im on tomcat 7 btw
 
 Then why are you asking about a problem in a very old version of
 Tomcat 6?

+1

Also, that web site looks like a scraping site that steals content
from some other site like StackOverflow, Nabble, etc.

The question isn't even complete it cuts off in the middle.

Errors of this kind are usually due to a problem in the application,
but there have been some edge cases found over the last few years and
patched.

You should make sure you are using the most up-to-date patch version
of Tomcat in your release line. If you are using Tomcat 7, you want to
make sure you are using Tomcat 7.0.54 which was just recently released
and includes a few security updates.

As for a technology for the future, you should dump Comet: the world
is standardizing on Websocket. Java EE now includes a Websocket API,
so you'll be able to deploy Websocket-based web applications on any
compliant container instead of tying yourself to the Tomcat-specific
Comet implementation.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTh4YUAAoJEBzwKT+lPKRYGG4QAMta8eJb8vCRFz/+JKLxLmja
Ufeklv7CL1W+UDcljU/0t9YuWk1pfGiXRn2ORgLDuZUee69Eb2c959z4owpMaEiX
ctqWTre1qA7sYCuQkBHehsOP4ohGYnhvndFeqJEMHedoQvj1y5WsNydXMwCYhCx3
czWYbrL3tb8h6VjOMfEEOi1LFyV7hNIvaKt4I4WRw+8HMC6kLRTvoJf0JB8Ikj0s
JZ9whO481K6H6WhxNYSx+/VrOUsX986LNXqnsEbhGhrEq3OJsBgF5Tmfy068PqbX
OlzVDJP8wNpriauFpKDLrB/KKvQKnFEbEEcJ9rXJs799+3URkOZ7e63Cw9wN1Ie4
30kaGCt+qNQswV2WAKaJz9wJQATO2TVb+Cf/fA2XKzGpCDCR1wC3dJo2Tk4RW7q8
QJJ72TpZEGr/b4V67MSbKZhN28MQnzIIeKp+0105n2Bvjwomof6Lz7c2RMD9+YJQ
K8RYyBD5K6eQqoOn3+9aWTjPPYLy6zquoQV5bWiVmasBs9VdiuhSpdlNbKL8D9Ot
rkYuz9QhlSTxftQPbSVkIV8xxhQJlhHkXYCd+pXhSCPJ7VeqhPHmz8gnDj4v6RAJ
oBDvxLpaNySoh970rf5yIQhJATTCMwZyxEZlQ2rI+HUg9VrnVUlT/hRnPMFwYZml
fFIxarosofRPMdiBIVta
=tRxc
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: comet question

2014-05-29 Thread Elias Kopsiaftis
ok thanks guys, I just got freaked out when I saw that post.


On Thu, May 29, 2014 at 3:10 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 David,

 On 5/29/14, 2:45 PM, David kerber wrote:
  On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:
  oh yea, im on tomcat 7 btw
 
  Then why are you asking about a problem in a very old version of
  Tomcat 6?

 +1

 Also, that web site looks like a scraping site that steals content
 from some other site like StackOverflow, Nabble, etc.

 The question isn't even complete it cuts off in the middle.

 Errors of this kind are usually due to a problem in the application,
 but there have been some edge cases found over the last few years and
 patched.

 You should make sure you are using the most up-to-date patch version
 of Tomcat in your release line. If you are using Tomcat 7, you want to
 make sure you are using Tomcat 7.0.54 which was just recently released
 and includes a few security updates.

 As for a technology for the future, you should dump Comet: the world
 is standardizing on Websocket. Java EE now includes a Websocket API,
 so you'll be able to deploy Websocket-based web applications on any
 compliant container instead of tying yourself to the Tomcat-specific
 Comet implementation.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJTh4YUAAoJEBzwKT+lPKRYGG4QAMta8eJb8vCRFz/+JKLxLmja
 Ufeklv7CL1W+UDcljU/0t9YuWk1pfGiXRn2ORgLDuZUee69Eb2c959z4owpMaEiX
 ctqWTre1qA7sYCuQkBHehsOP4ohGYnhvndFeqJEMHedoQvj1y5WsNydXMwCYhCx3
 czWYbrL3tb8h6VjOMfEEOi1LFyV7hNIvaKt4I4WRw+8HMC6kLRTvoJf0JB8Ikj0s
 JZ9whO481K6H6WhxNYSx+/VrOUsX986LNXqnsEbhGhrEq3OJsBgF5Tmfy068PqbX
 OlzVDJP8wNpriauFpKDLrB/KKvQKnFEbEEcJ9rXJs799+3URkOZ7e63Cw9wN1Ie4
 30kaGCt+qNQswV2WAKaJz9wJQATO2TVb+Cf/fA2XKzGpCDCR1wC3dJo2Tk4RW7q8
 QJJ72TpZEGr/b4V67MSbKZhN28MQnzIIeKp+0105n2Bvjwomof6Lz7c2RMD9+YJQ
 K8RYyBD5K6eQqoOn3+9aWTjPPYLy6zquoQV5bWiVmasBs9VdiuhSpdlNbKL8D9Ot
 rkYuz9QhlSTxftQPbSVkIV8xxhQJlhHkXYCd+pXhSCPJ7VeqhPHmz8gnDj4v6RAJ
 oBDvxLpaNySoh970rf5yIQhJATTCMwZyxEZlQ2rI+HUg9VrnVUlT/hRnPMFwYZml
 fFIxarosofRPMdiBIVta
 =tRxc
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: comet question

2014-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Elias,

On 5/29/14, 3:12 PM, Elias Kopsiaftis wrote:
 ok thanks guys, I just got freaked out when I saw that post.

There are other things that might freak you out. Read the security
statements for Tomcat 7, for instance, and decide if you are at the
right patch level.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTh4ccAAoJEBzwKT+lPKRYLSUP/ibTnQzEkEyJery1gcYNPR3Z
XkTuC00K4raPfa2GV/CBjqJq30LNxmMLShi0B+QMsmij4yOmwQCgpqpWYYt0dpmb
LACEM61MaLCvnnfUCM0xdsw3QcynjqafXyRWm0MyZYp3+mt+lULjyfJsQ/u+1mp7
UlMrAKC1zNVh5abVDM1v+hTI1c9LE+Xx/rAujpFBLk8U5iJ4B7qwmRztdYcciLpn
j9m5JdMdv4PSZ2hHPQKsefJzNrsojGGMzU4pbmQk/bvDaWRCZd60fo+d8k6sPZzY
oMPUTXxwuSyzn+rXtWqhiof98SqIcmYPzrRDvZhZi/4WCMVnnyIir0yFNNDhZnjc
H+7INzSDJtH3P/Vg7uYpNXoagPmH2veZtGl85QHpczzRlTOeJeO/Y6KMefkaRodq
33b2KjYOoWdatde35YWaPn2CK+eGEtMuwWKkWrzoVNvtgUG3yKXPodSkqhhCp3LT
Ir04OAj60uhcD3yLSNuer/tGAziL0mMhk7zyTeAXpmRTvE/Ff7YKTkbKG33YIMJN
rUa7KKMvx9mq+AYocmkQEyqiMFuFGr07neQOeAKusLJuKiuOzhTZ7HOJtgJf3n0K
MkQE94Zk1tRlmbKw4onoNnh83ZFk7fpnqs7MsJuirZNdd6UFZvutmcLLqlZn0TMB
EXnhj0NWDDs9NCA+IMtj
=bQcf
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: comet question

2014-05-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Elias,

On 5/29/14, 3:08 PM, Elias Kopsiaftis wrote:
 To make sure it doesnt exist in Tomcat7. Thats why. Ive never
 looked into the tomcat source code and theres no point for my
 current project unless this bug still exists. Just trying to save
 myself the work. Also, I couldnt find a page of known tomcat7 comet
 issues. If such a page existed it would be helpful

Check Bugzilla. Anything logged and not fixed is known, I suppose.

Also check the changelogs. Feel free to check everything between Tomat
6.0.33 and Tomcat 7.0.54, but that's a lot of reading.

Are you actually having a problem, or are you just scared of what
might be out there?

To my knowledge, there are no proofs that Tomcat has zero flaws.
Therefore, it could potentially serve every response to the wrong
client. Experience says that does not happen. Common sense also tells
you that, because nobody would use Tomcat if it was so horribly broken.

There have been related bugs in the past that have been fixed when
found. If you think you have found one, please report it with as much
information as you can. But if you are just asking if there is a known
problem with Tomcat where responses go to the wrong client, the answer
is no: if we knew about a problem, we'd fix it and roll a new release.

- -chris

 On Thu, May 29, 2014 at 2:45 PM, David kerber
 dcker...@verizon.net wrote:
 
 On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:
 
 oh yea, im on tomcat 7 btw
 
 
 Then why are you asking about a problem in a very old version of
 Tomcat 6?
 
 
 
 
 
 On Thu, May 29, 2014 at 2:13 PM, Elias Kopsiaftis
 yemi...@gmail.com wrote:
 
 Hey guys,
 
 I found this on the web, and it really alarms me because my
 web app which is in development depends on Comet technology
 to work.
 
 
 http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_ 
 sends_data_to_a_wrong_user.html
 
 Before I start digging into the tomcat7 source code, can
 anyone verify or contest the issue on that site? If Comet is
 not 100% dependable, how about WebSockets as an alternative?
 
 
 
 
 -

 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTh4btAAoJEBzwKT+lPKRYhvgQAMO2/TysR56uWeAo3nDRiJZP
2R9Q26t0UmAVqbUfujs0VtCGTySv6LKCHgbG6I/XQotSbdeaWY9jIZphqpLxylLV
T24WqIFAv2J4ZLsx/W09pXMqvErVnp0kuesaFnEj4ooOfqATRTG0oscgQxy6Qrtb
kzoOHYxG8c0/T/RnvNF+97F3ybRdwpW4U2TwLvtMYCw6H9MSzUPRJLdSIbnA4oS2
Bf7OcVoHCJ/53ODDuUfTpFXZgEucNmq58HHRaV0TYBQjIv1GwMMe889MWrfIQzuO
rmHbXqORb/tRTZeV2DxPZ2t3AS0qU6K1qz4SDX91jngMJg9Uclvh8iW5pSi8K5y9
a9ZGoB4nVX9vZlkLwazfHfvUXwFVfzqZL9yYaSc7cT8EGf/47KV/xjRombdKyw18
/M4pNEBrD+hOqKKB24J3u6v1aGuz6ffUZ8io94bAGNm+Nq86+cL45PxQ49pkyVIk
T7FQbM/NDgNJVRdByHalPlPyFtvC4d6mpU+yG9ryyESy1yCyMx9ojNTA/gt0IJ40
CZdqnPkEAsrzIadRYi/2n3eTQFrABHmH+jfh1ShzxLsd96mxz7GC1DM26yoJq/ok
ckiEY0zY058Csp1NafRoSKbDSQ48pkvBvF0eccym3fCZwknA22a9iuZ9eRkLXbdO
NxKin3hu9RQlMzCC1jmI
=yrsV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: comet question

2014-05-29 Thread Elias Kopsiaftis
I am having random errors, but we are still looking into them because right
now we think they are probably from our end. The current one is that the
connection from the client to the comet servlet will randomly repeatedly
receive NULL. Still looking into this to see what the server is doing


On Thu, May 29, 2014 at 3:13 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Elias,

 On 5/29/14, 3:08 PM, Elias Kopsiaftis wrote:
  To make sure it doesnt exist in Tomcat7. Thats why. Ive never
  looked into the tomcat source code and theres no point for my
  current project unless this bug still exists. Just trying to save
  myself the work. Also, I couldnt find a page of known tomcat7 comet
  issues. If such a page existed it would be helpful

 Check Bugzilla. Anything logged and not fixed is known, I suppose.

 Also check the changelogs. Feel free to check everything between Tomat
 6.0.33 and Tomcat 7.0.54, but that's a lot of reading.

 Are you actually having a problem, or are you just scared of what
 might be out there?

 To my knowledge, there are no proofs that Tomcat has zero flaws.
 Therefore, it could potentially serve every response to the wrong
 client. Experience says that does not happen. Common sense also tells
 you that, because nobody would use Tomcat if it was so horribly broken.

 There have been related bugs in the past that have been fixed when
 found. If you think you have found one, please report it with as much
 information as you can. But if you are just asking if there is a known
 problem with Tomcat where responses go to the wrong client, the answer
 is no: if we knew about a problem, we'd fix it and roll a new release.

 - -chris

  On Thu, May 29, 2014 at 2:45 PM, David kerber
  dcker...@verizon.net wrote:
 
  On 5/29/2014 2:21 PM, Elias Kopsiaftis wrote:
 
  oh yea, im on tomcat 7 btw
 
 
  Then why are you asking about a problem in a very old version of
  Tomcat 6?
 
 
 
 
 
  On Thu, May 29, 2014 at 2:13 PM, Elias Kopsiaftis
  yemi...@gmail.com wrote:
 
  Hey guys,
 
  I found this on the web, and it really alarms me because my
  web app which is in development depends on Comet technology
  to work.
 
 
  http://bighow.net/4294974-Comet_under_Tomcat_6_0_33_
  sends_data_to_a_wrong_user.html
 
  Before I start digging into the tomcat7 source code, can
  anyone verify or contest the issue on that site? If Comet is
  not 100% dependable, how about WebSockets as an alternative?
 
 
 
 
  -
 
 
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJTh4btAAoJEBzwKT+lPKRYhvgQAMO2/TysR56uWeAo3nDRiJZP
 2R9Q26t0UmAVqbUfujs0VtCGTySv6LKCHgbG6I/XQotSbdeaWY9jIZphqpLxylLV
 T24WqIFAv2J4ZLsx/W09pXMqvErVnp0kuesaFnEj4ooOfqATRTG0oscgQxy6Qrtb
 kzoOHYxG8c0/T/RnvNF+97F3ybRdwpW4U2TwLvtMYCw6H9MSzUPRJLdSIbnA4oS2
 Bf7OcVoHCJ/53ODDuUfTpFXZgEucNmq58HHRaV0TYBQjIv1GwMMe889MWrfIQzuO
 rmHbXqORb/tRTZeV2DxPZ2t3AS0qU6K1qz4SDX91jngMJg9Uclvh8iW5pSi8K5y9
 a9ZGoB4nVX9vZlkLwazfHfvUXwFVfzqZL9yYaSc7cT8EGf/47KV/xjRombdKyw18
 /M4pNEBrD+hOqKKB24J3u6v1aGuz6ffUZ8io94bAGNm+Nq86+cL45PxQ49pkyVIk
 T7FQbM/NDgNJVRdByHalPlPyFtvC4d6mpU+yG9ryyESy1yCyMx9ojNTA/gt0IJ40
 CZdqnPkEAsrzIadRYi/2n3eTQFrABHmH+jfh1ShzxLsd96mxz7GC1DM26yoJq/ok
 ckiEY0zY058Csp1NafRoSKbDSQ48pkvBvF0eccym3fCZwknA22a9iuZ9eRkLXbdO
 NxKin3hu9RQlMzCC1jmI
 =yrsV
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Comet question with Tomcat

2009-10-07 Thread Markus Innerebner

Hi all,

I am using Tomcat6  together with Comet. I implemented as described in 
the article Advanced IO and Tomcat the servlet, message sender ...


The main reason for using comet is that I would like to implement a kind 
of streaming, what means:


I am launching from the client with a AJAX request that is processed by 
the servlet: on the server the EventType.BEGIN is passed to the event 
method and than I start to run an specific algorithm. In this algorithm, 
whenever a specific event occurs, the message sender is notified and 
writes into the response write a content. This stream is send to the 
client, parsed and displayed in the page.


Unfortunately on the client I only see the content send from message 
sender after the first event. All others are not send to the client even 
if the message sender writes it out int the response which is still open.


On client side the javascript function (see below go()) is invoked only 
once. Any idea what I am doing wrong?


function go(){
var url = http://myHost:8080/myServlet;;
var request = new XMLHttpRequest();
request.open(POST, url, true);
request.setRequestHeader(Content-Type, 
application/x-javascript;);

request.onreadystatechange = function(){
if (request.readyState == 4) {
if (request.status == 200) {
	if (request.responseText) { 
   document.getElementById(msgContainer).innerHTML = 
request.responseText;

}
}
}
};
request.send(null);
}


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Comet Question

2008-05-28 Thread Adam Kaupisch
Found the problem...the issue that I had was the following: I didn't
realize that the webapp that I was trying to change was using a redirect
servlet in a different project (which didn't implement CometProcessor).
Once I disabled the redirect servlet, things started to work...

So that brings me to my next Comet noob question...the redirect servlet
in this other project extends HttpServlet and only has an init and
service method defined...how do I integrate that with CometProcessor? Do
I still implement CometProcessor and leave the event method empty? I'll
start with trying that first, but wanted to know what people recommend
before I just hack at it...

Thanks

Adam

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2008 8:20 PM
To: Tomcat Users List
Subject: Re: Tomcat Comet Question

try the simplest thing first, upgrade to 6.0.16,
in terms of your config, you have tcnative-1.dll in your PATH, but you 
haven't configured the APR connector, you have configured NIO (which 
works for comet) and the regular blocking (which doesn't work for comet)


Filip


Adam Kaupisch wrote:
 I am having trouble getting Comet to work and was hoping someone knows
 what my problem is...

  

 I am running 6.0.13 on windows XP (yea, I need to change to linux, I
 know)...anyway, I went through getting the APR setup and I believe I
 have done so...based on when I start tomcat up, I get this message:

 May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
 init

 INFO: Loaded Apache Tomcat Native library 1.1.12.

 May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
 init

 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
 [false], random [true].

 May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol
init

 INFO: Initializing Coyote HTTP/1.1 on http-8080

 May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11Protocol init

 INFO: Initializing Coyote HTTP/1.1 on http-8081

 May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol
init

 INFO: Initializing Coyote HTTP/1.1 on http-8443

 May 27, 2008 2:45:24 PM org.apache.catalina.startup.Catalina load

 INFO: Initialization processed in 1741 ms

  

 I have a servlet that sits behind a filter. When I try to access it,
it
 calls doFilter(...) instead of doFilterEvent(...). Is there something
 I'm missing in my config? I'm poking around blindly, so I'd be happy
if
 anyone can point me in the right direction.

  

 Thanks

  

 Adam


   



 No virus found in this incoming message.
 Checked by AVG. 
 Version: 7.5.524 / Virus Database: 269.24.1/1468 - Release Date:
5/26/2008 3:23 PM
   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Comet Question

2008-05-27 Thread Adam Kaupisch
I am having trouble getting Comet to work and was hoping someone knows
what my problem is...

 

I am running 6.0.13 on windows XP (yea, I need to change to linux, I
know)...anyway, I went through getting the APR setup and I believe I
have done so...based on when I start tomcat up, I get this message:

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: Loaded Apache Tomcat Native library 1.1.12.

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8081

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8443

May 27, 2008 2:45:24 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1741 ms

 

I have a servlet that sits behind a filter. When I try to access it, it
calls doFilter(...) instead of doFilterEvent(...). Is there something
I'm missing in my config? I'm poking around blindly, so I'd be happy if
anyone can point me in the right direction.

 

Thanks

 

Adam



Re: Tomcat Comet Question

2008-05-27 Thread Alex Barclay

Adam Kaupisch wrote:

I am having trouble getting Comet to work and was hoping someone knows
what my problem is...

 


I am running 6.0.13 on windows XP (yea, I need to change to linux, I
know)...anyway, I went through getting the APR setup and I believe I
have done so...based on when I start tomcat up, I get this message:

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: Loaded Apache Tomcat Native library 1.1.12.

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8081

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8443

May 27, 2008 2:45:24 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1741 ms

 


I have a servlet that sits behind a filter. When I try to access it, it
calls doFilter(...) instead of doFilterEvent(...). Is there something
I'm missing in my config? I'm poking around blindly, so I'd be happy if
anyone can point me in the right direction.

 

  

Did you remember to have your servlet implement CometProcessor?

Your messages don't look quite right. On Linux my startup gives...
May 23, 2008 3:41:28 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.12.
May 23, 2008 3:41:28 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters 
[false], random [true].

May 23, 2008 3:41:28 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080

Note that I initialized an Http11AprProtocol, you initialized a regular 
Http11Protocol. Did you explicitly define this in the server.xml?


Alex.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Comet Question

2008-05-27 Thread Filip Hanik - Dev Lists

try the simplest thing first, upgrade to 6.0.16,
in terms of your config, you have tcnative-1.dll in your PATH, but you 
haven't configured the APR connector, you have configured NIO (which 
works for comet) and the regular blocking (which doesn't work for comet)



Filip


Adam Kaupisch wrote:

I am having trouble getting Comet to work and was hoping someone knows
what my problem is...

 


I am running 6.0.13 on windows XP (yea, I need to change to linux, I
know)...anyway, I went through getting the APR setup and I believe I
have done so...based on when I start tomcat up, I get this message:

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: Loaded Apache Tomcat Native library 1.1.12.

May 27, 2008 2:45:23 PM org.apache.catalina.core.AprLifecycleListener
init

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8081

May 27, 2008 2:45:24 PM org.apache.coyote.http11.Http11NioProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-8443

May 27, 2008 2:45:24 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1741 ms

 


I have a servlet that sits behind a filter. When I try to access it, it
calls doFilter(...) instead of doFilterEvent(...). Is there something
I'm missing in my config? I'm poking around blindly, so I'd be happy if
anyone can point me in the right direction.

 


Thanks

 


Adam


  



No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.1/1468 - Release Date: 5/26/2008 3:23 PM
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Comet question. Problem reading from http input stream

2007-04-24 Thread Rémy Maucherat

On 4/23/07, Martin Perez [EMAIL PROTECTED] wrote:

Any suggestions?


I would try to avoid using directly Object*Stream, to see what
happens, and verify the validity of the data which is sent and
received.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Comet question. Problem reading from http input stream

2007-04-24 Thread Martin Perez

Hi Rémy,

Actually, without using Object*Stream everything seems to work. I'm
currently using raw I/O streams and the communication is ok.

I guess people on the list would be interesting to know that currently
doesn't work with Object*Streams, either when Object*Streams are not
specially famous for being a great implementation.

Regards,
Martin

On 4/24/07, Rémy Maucherat [EMAIL PROTECTED] wrote:


On 4/23/07, Martin Perez [EMAIL PROTECTED] wrote:
 Any suggestions?

I would try to avoid using directly Object*Stream, to see what
happens, and verify the validity of the data which is sent and
received.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Comet question. Problem reading from http input stream

2007-04-24 Thread Rémy Maucherat

On 4/24/07, Martin Perez [EMAIL PROTECTED] wrote:

Hi Rémy,

Actually, without using Object*Stream everything seems to work. I'm
currently using raw I/O streams and the communication is ok.

I guess people on the list would be interesting to know that currently
doesn't work with Object*Streams, either when Object*Streams are not
specially famous for being a great implementation.


It is maybe possible that the streams would want a certain amount of
data at once to process it correctly ? I don't remember a known issue
about that, but as with Java2D, I would recommend not directly using
these streams on top of the Servlet API provided streams.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-04 Thread Filip Hanik - Dev Lists

Rémy Maucherat wrote:

On 4/3/07, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

yes, a proposal is coming up, my guess is that you will do a {public int
write(ByteBuffer)} on the CometEvent object. returns number of bytes
written, but nothing is set in stone yet


I hope that your proposal does not include that sort of API, because
I'm not going to like it if it does.
I'm still noodling on it :), my old brain just needs some time, ideally 
I want to find a transparent way.

Filip


Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,

Thanks again for the reply. I can't reproduce the END event so probably 
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event. 
If an exception occurs during the handling of this event (an unforseen 
runtime exception for example), then tomcat calls the event method again 
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times ;-))


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/2/07, Rémy Maucherat [EMAIL PROTECTED] wrote:
 I was also just discovered that in the 6.0.10 version that an 
exception

 in the END event causes the END event to called again; this means that
 an uncaught RuntimeException could potentially cause Tomcat to go 
into a

 loop of an infinite number of END events.

I will verify that.


I have looked at it, and I don't understand the issue. First of all,
END is a theorical event, which cannot really be called at the moment,
except in very specific cases (when the connector is stopped). Can you
give more details ? Maybe you meant ERROR ?

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,


Another reason that I need to be able to throw the exception in the
BEGIN event is because for some requests there is no input, only output,
so I might never actually get a READ event (GET requests for long pieces
of data for example). However I do want to write output to the client as
it comes in (which is why I need Comet) and it's not a file, it is a
dynamically generated stream, making the standard servlet (serivce
method) approach infeasable from a scalability point of view.


You don't have to wait to be inside the processing of a read event to
write data.

But I need to verify if the request is valid, and since I don't know if 
there will be a read event the only place I can do it is in the begin 
event. Throwing the ServletException there was my way of dealing with 
the invalid request; that was why I needed to throw it in the begin 
event and not somewhere else.


Regards,
Sebastiaan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Rémy Maucherat

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times ;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Sebastiaan van Erk

Hi,

Thanks for all the answers! :-)

It's good to know the way the events should be treated and interpreted. 
It's quite different from how it's described on 
http://tomcat.apache.org/tomcat-6.0-doc/aio.html, and the JavaDoc does 
not really describe the spec either.


Using the sendError method in the response and the new interpretation of 
the events I think I will be able to manage.


One more question though: is there any way to do nonblocking output of 
dynamic content (streams)? The above documentation only talks about 
files on the file system.


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of times 
;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Filip Hanik - Dev Lists

Sebastiaan van Erk wrote:

Hi,

Thanks for all the answers! :-)

It's good to know the way the events should be treated and 
interpreted. It's quite different from how it's described on 
http://tomcat.apache.org/tomcat-6.0-doc/aio.html, and the JavaDoc does 
not really describe the spec either.


Using the sendError method in the response and the new interpretation 
of the events I think I will be able to manage.


One more question though: is there any way to do nonblocking output of 
dynamic content (streams)? The above documentation only talks about 
files on the file system.
yes, a proposal is coming up, my guess is that you will do a {public int 
write(ByteBuffer)} on the CometEvent object. returns number of bytes 
written, but nothing is set in stone yet


Filip


Regards,
Sebastiaan

Rémy Maucherat wrote:

On 4/3/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks again for the reply. I can't reproduce the END event so probably
I was mistaken, sorry about that. It is indeed the ERROR/TIMEOUT event.
If an exception occurs during the handling of this event (an unforseen
runtime exception for example), then tomcat calls the event method 
again
with the ERROR/TIMEOUT event, ad infinitum (or at least lots of 
times ;-))


Ok, it's the same for a read then (for which I could reproduce a
loop), as error/timeout is not really an error (it gives you the
opportunity to close end the request if you want to by calling
event.close).

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-03 Thread Rémy Maucherat

On 4/3/07, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

yes, a proposal is coming up, my guess is that you will do a {public int
write(ByteBuffer)} on the CometEvent object. returns number of bytes
written, but nothing is set in stone yet


I hope that your proposal does not include that sort of API, because
I'm not going to like it if it does.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-02 Thread Sebastiaan van Erk

Hi,

Thanks for the response.

To get these adjustments, do I need to download tomcat from a subversion 
(or CVS) repository?


I was also just discovered that in the 6.0.10 version that an exception 
in the END event causes the END event to called again; this means that 
an uncaught RuntimeException could potentially cause Tomcat to go into a 
loop of an infinite number of END events.


The reason I need to be able to throw an exception in the BEGIN event is 
because each request belongs to a certain client. I already know which 
client it belongs to from the http headers. If the client has timed out 
or does not exist on the server, the request is invalid. Thus I don't 
have to wait for a READ event to throw the error.


Another reason that I need to be able to throw the exception in the 
BEGIN event is because for some requests there is no input, only output, 
so I might never actually get a READ event (GET requests for long pieces 
of data for example). However I do want to write output to the client as 
it comes in (which is why I need Comet) and it's not a file, it is a 
dynamically generated stream, making the standard servlet (serivce 
method) approach infeasable from a scalability point of view.


Does this make sense or am I going about it the wrong way?

Regards,
Sebastiaan

Rémy Maucherat wrote:

I have made some adjustments.

An exception there should produce an error report, and a sendError
should do the same. However, an event.close should simply end the
processing of the request without any change of the response state
(which will be whatever was set in the servlet).

Note: the purpose of begin is to setup any data structures to track
the future events on the connection, so you're not really supposed to
throw exceptions while processing that.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-02 Thread Rémy Maucherat

On 4/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

Hi,

Thanks for the response.

To get these adjustments, do I need to download tomcat from a subversion
(or CVS) repository?


Yes.


I was also just discovered that in the 6.0.10 version that an exception
in the END event causes the END event to called again; this means that
an uncaught RuntimeException could potentially cause Tomcat to go into a
loop of an infinite number of END events.


I will verify that.


Another reason that I need to be able to throw the exception in the
BEGIN event is because for some requests there is no input, only output,
so I might never actually get a READ event (GET requests for long pieces
of data for example). However I do want to write output to the client as
it comes in (which is why I need Comet) and it's not a file, it is a
dynamically generated stream, making the standard servlet (serivce
method) approach infeasable from a scalability point of view.


You don't have to wait to be inside the processing of a read event to
write data.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-04-02 Thread Rémy Maucherat

On 4/2/07, Rémy Maucherat [EMAIL PROTECTED] wrote:

 I was also just discovered that in the 6.0.10 version that an exception
 in the END event causes the END event to called again; this means that
 an uncaught RuntimeException could potentially cause Tomcat to go into a
 loop of an infinite number of END events.

I will verify that.


I have looked at it, and I don't understand the issue. First of all,
END is a theorical event, which cannot really be called at the moment,
except in very specific cases (when the connector is stopped). Can you
give more details ? Maybe you meant ERROR ?

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6.0.10 Comet question

2007-03-30 Thread Sebastiaan van Erk

Hi,

I'm trying to use Comet in tomcat 6.0.10, and have the following test class:

public class CometServlet extends HttpServlet implements CometProcessor {

   public void event(final CometEvent event) throws IOException, 
ServletException {

   final HttpServletRequest request = event.getHttpServletRequest();
   final HttpServletResponse response = event.getHttpServletResponse();

if (event.getEventType() == CometEvent.EventType.BEGIN) {
throw new ServletException(test message);
   } else if (event.getEventType() == CometEvent.EventType.ERROR) {
   // ...
   event.close();
   } else if (event.getEventType() == CometEvent.EventType.END) {
   // ...
   event.close();
   } else if (event.getEventType() == CometEvent.EventType.READ) {
   // ...
   }
   }

}

When I make a request to Tomcat and set a breakpoint on the event 
method, I see that I get a BEGIN event and the servlet exception is 
thrown. The exception appears in my Tomcat log. However, the client 
connection is not terminated. Instead, after waiting for a while, I get 
another event: the ERROR/TIMEOUT event. The call to event.close() then 
causes the request to be finished, and the client gets a 200 response 
with an empty body.


The behavior I am trying to create is different though: I would like a 
500 response to the client as soon as the error condition arises (the 
exception is thrown). I tried a try { throw exception; } finally { 
event.close(); }, but it seems that event.close() causes a 200 response 
no matter what.


How do I get the CometProcessor to give the client a 500 response 
immediately? Note that I have not written anything to the response, so 
it is not comitted yet.


Thanks for any help/pointers,
Sebastiaan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6.0.10 Comet question

2007-03-30 Thread Rémy Maucherat

I have made some adjustments.

An exception there should produce an error report, and a sendError
should do the same. However, an event.close should simply end the
processing of the request without any change of the response state
(which will be whatever was set in the servlet).

Note: the purpose of begin is to setup any data structures to track
the future events on the connection, so you're not really supposed to
throw exceptions while processing that.

Rémy

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]