Just like this issue: http://atmosphere-framework.2306103.n4.nabble.com/WebSocket-not-working-on-Tomcat-7-With-NIO-connector-was-WebSocket-not-working-on-Tomcat-7-td4652351.html
On Tue, Apr 23, 2013 at 10:16 PM, Mark Thomas <ma...@apache.org> wrote: > On 23/04/2013 15:11, Praveen Peddi wrote: > > Hi all, I am trying to set Nio connector in tomcat7 so I can use > > WebSocket support. I did the following (as simple as it can get) but > > it doesn't seem to work. When I do this I can't connect to the > > server. For example I have a GET REST request that should work but I > > get connection refused. Same with WebSocket request. > > > > > > Connector nioConnector = new Connector(); > > > > nioConnector.setPort(TOMCAT_PORT); > > > > nioConnector.setProtocol(Http11NioProtocol.class.getName()); > > > > tomcat.setConnector(nioConnector); > > > > > > If I comment out above lines and use default Http connector, REST > > requests work fine but WebSockets are not supported with default http > > connector. > > Yes they are. > > > So I am wondering if anyone has enabled bio connector in > > embedded tomcat before. I am using embedded tomcat 7.0.34. > > You mean NIO right? > > Look at the source code for the unit tests and/or the source code for > Connector. You aren't changing what you think you are changing. (Too > many attributes call Protocol or something similar). > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Contribute to Enterprise Integration