-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 David,
On 10/30/13, 9:29 AM, David kerber wrote: > On 10/30/2013 9:12 AM, Morten Bo Oelbye wrote: >> Where can I find any solution about an persistent Connection. I >> can use the reques.inputstream as long as want. But when I use >> the response as an outputstream, the connectien is closed. So, >> how to write ping, pong, ping, pong, etc without closing? An >> keep-Alive does not do it. Please help >> > > Websockets? +1 It's odd that the "outputstream connection is closed". I suppose it depends upon the usage scenario.... if you do something like fire-off a thread with a reference to the response and then your servlet's doXXX method completes, then the container will recycle the response and your thread won't work properly. If you want to do bi-directional persistent communication, you are going to have to leave the world of HTTP and use a different protocol... like Websockets (which use a traditional HTTP connection to get things going, and then "upgrades" the connection to one that can be used persistently). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJScXEyAAoJEBzwKT+lPKRYsOcP/jnaLsjb1M6Xj7DQuUtimxPs 2PolVPmjfgXMkgK70LaMUefVRB17fPvVS1QHX3KAH/NDb7CKhNfbhxGKIDylt7pd rXuDnhuMVz2AiqpZ7S2aBnOVAKhX5QCW7nnOVo2FUvoLqf5VJe9uHcJfjcNCPsQH /gSbvDZrhqwH9NwgR6SN6LhokJcA0qYWKcVLqgNO096/NkkiupbJHbk2hyNECw6p ou1QOiWxDP1tv0rIUKEwKwFxJw32EzyiOfVO/T7h4b3EUKZ7l866MKhajsHzsfSa JBT8Hl5iFveiyMZPGm4YTmcdcGT2DbzoXxhDJo1j+7ciya+ftONdvhc4S4fZHJeN UeeKC50tYP1uDudMveTktYdOVCo0EY3KySNYKoL+759Xjr+QBcv9tQwboDjfCh+1 SlSZhChg0M5XOLWwMjNQlwEFWnyy9kmIyA9FunmkPHT6tVUzD1hlsZjiTg7H2hU6 S8XW0/WsH0UoS7iAHwHNS657HEWuWgAYJZ0D8YPXhmDJMF83tRaWszd3sA5Q8KIS iPOCrI4CmNoVDWyTkd+GERK4JDXq95MGzJj0K8XBR6FquViM8weSfPU5S5Ie6x23 9GY+0CBoRvmP1jjMu1c76sWiJk26dI0j2uQ5CztZUkHHg3KrXbyTyuNiEcxSXKwD E9dL59Nh//WwjNkLFh6h =i28R -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org