Skip to main content

Getting started with Atmosphere CPR part 1: Writing the HelloWord of Comet....a Chat application

Posted by jfarcand on March 17, 2009 at 1:19 PM PDT

This blog has moved here

Related Topics >>

Comments

I don't get the "system message from Glassfish-v3"

Hi I am having some problems. I downloaded the war and deployed it to my glassfish v3 server. I see the proper html when i go to http://localhost:8080/atmosphere-chat-0.1-ALPHA/ but I don't get the "system message from Glassfish-v3 " echoing that a certain person has logged in. Can someone help me?

Hey, can you download the

Hey, can you download the latest version of that demo (0.5.1) and follow up on users@dev.atmosphere.java.net? The version you are trying is a little bit old.

Hi, I've deployed this using alpha2 of atmosphere and it seems that Broadcaster.broadcast() only broadcasts to one of the opened browser windows. Is this a client issue? Any ideas ? Thanks!

jedeegan - rename the war to just atmosphere-chat.war without the version information. Then put in your webapps directory. You will also need to change the xml Connector node's protocol attribute in server.xml from HTTP/1.1 to "org.apache.coyote.http11.Http11NioProtocol".

After deploying WAR into Tomcat 6.0.18, I added file atmosphere.xml to META-INF folder. When I open http://localhost:8080/chat in browser, I got HTTP 404 error - "requested resource not available." Tomcat Manager shows context as /atmosphere-chat-0.1-ALPHA, which loads the GlassFish login page (index.html). Please advise how to run under Tomcat, or is WAR only meant for GlassFish and runs OK after modifying domain.xml per your blog? Thanks for very useful (scalable) AjaxPush/Comet implementation.

After deploying the war to the latest version of Tomcat when I try to login it returns with the following 500 error. javax.servlet.ServletException: Tomcat failed to detect this is a Comet application Please add the following content under your META-INF/context.xml of your war file. This is already there. Any ideas?

Thank you for your interesting article, and to the team project! I successed some experiments with a simple Groovy script (using HTTPBuilder) that acted like a browser and that communicated with the Chat server. So I was able to send messages and receive messages coming from browsers. Thanks.

Although the chat application works fine (missed a message or 2 in IE, maybe due to prototype/behavior issues) on tomcat 6.0.x with NIO connector the same is not true for APR connector. Is this a known limitation, because COMET in tomcat shld work for both the NIO and APR connectors? (at least according to tomcat 6.0.x documentation at http://tomcat.apache.org/tomcat-6.0-doc/aio.html)