You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by javaxmlsoapdev <vi...@yahoo.com> on 2007/10/25 18:04:46 UTC

NIO connector in Tomcat 6.0.14

I am trying to use NIO connector for getting comet chat example work. 

Here is what I have in server.xml. I commented out original connector on
8080 (as you can see below) and added NIO on port 8080. 
 <!--Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" -->
    <Connector port="8080"
protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
connectionTimeout="20000" redirectPort="8443" />	

I don't above is setup correctly due to two things
1)It takes forever (may be until specified timeout period) to respond and
request comes back doing nothing
2)Comet chat example doesn't work. No errors or anything but it simply
doesn't push chat messages to client browsers, I have two browsers open
running same chat application.

Am I not setting up connector properly? Is there any other config required?
how to get this comet chat example working. Please note that I searched the
forum already but still confused on NIO connector entry in server.xml.

Any ideas?

Thanks,
-- 
View this message in context: http://www.nabble.com/NIO-connector-in-Tomcat-6.0.14-tf4691648.html#a13409349
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: NIO connector in Tomcat 6.0.14

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
there is a working Bayeux example, that also shows that Comet works, a 
little more icing on the cake than necessary

steps to get it
1. check out the code from SVN
svn co --username tomcat --password tomcat 
http://svn.hanik.com/svn/repos/tomcat-bayeux

2. Copy the application
a) copy tomcat-bayeux/build/tomcat-cometd.jar to TC_HOME/lib
b) copy tomcat-bayeux/build/cometd.war to TC_HOME/webapps

3. Start Tomcat

4. Test the application
http://localhost:8080/cometd/examples/simplechat/cometdchat.htm

this simple chat example, has one user on the server that echoes all 
your messages,
we haven't built out the examples properly, but you will see that a 
connection is always kept open while the client is polling the server, 
but the server doesn't tie up a thread
netstat -na |grep 8080 should show a connection open

Filip

Stephen More wrote:
> On Thu, Oct 25, 2007 at 12:19 PM, Filip Hanik - Dev Lists <dev....m> wrote:
>   
>> browser don't work the way you might it expect to, firefox for example,
>>  will not display anything until the entire request is complete. so the
>>  chat example is no good that way.
>>  write a client application for your comet, to test how it works
>>     
>
> Does anyone have java code to test that the chat comet example is
> working correctly ?
>
> -Thanks
> Steve More
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


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


Re: NIO connector in Tomcat 6.0.14

Posted by Stephen More <st...@gmail.com>.
On Thu, Oct 25, 2007 at 12:19 PM, Filip Hanik - Dev Lists <dev....m> wrote:
> browser don't work the way you might it expect to, firefox for example,
>  will not display anything until the entire request is complete. so the
>  chat example is no good that way.
>  write a client application for your comet, to test how it works

Does anyone have java code to test that the chat comet example is
working correctly ?

-Thanks
Steve More

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


Re: NIO connector in Tomcat 6.0.14

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
browser don't work the way you might it expect to, firefox for example, 
will not display anything until the entire request is complete. so the 
chat example is no good that way.
write a client application for your comet, to test how it works

Filip

javaxmlsoapdev wrote:
> I am trying to use NIO connector for getting comet chat example work. 
>
> Here is what I have in server.xml. I commented out original connector on
> 8080 (as you can see below) and added NIO on port 8080. 
>  <!--Connector port="8080" protocol="HTTP/1.1" 
>                connectionTimeout="20000" 
>                redirectPort="8443" -->
>     <Connector port="8080"
> protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
> connectionTimeout="20000" redirectPort="8443" />	
>
> I don't above is setup correctly due to two things
> 1)It takes forever (may be until specified timeout period) to respond and
> request comes back doing nothing
> 2)Comet chat example doesn't work. No errors or anything but it simply
> doesn't push chat messages to client browsers, I have two browsers open
> running same chat application.
>
> Am I not setting up connector properly? Is there any other config required?
> how to get this comet chat example working. Please note that I searched the
> forum already but still confused on NIO connector entry in server.xml.
>
> Any ideas?
>
> Thanks,
>   


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