users@grizzly.java.net

Re: Getting cometd Bayeux sample to work

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 23 Jun 2008 10:35:18 -0400

Bjarki Bjorgulfsson wrote:
> I’m having trouble getting the
> http://download.java.net/maven/2/com/sun/grizzly/samples/grizzly-cometd-chat/
> to work. I have tried on 2 different Windows machine but nothing happens
> at all in either case. Here is what I did:
>
>
>
> 1. Downloaded the chat example war from the above url,
> grizzly-cometd-chat-1.8.0-rc1.war
> 2. Downloaded
> http://download.java.net/maven/2/com/sun/grizzly/grizzly-cometd-webserver/1.8.0/grizzly-cometd-webserver-1.8.0.jar
>
> 3. Ran java -jar grizzly-cometd-webserver-1.8.0.jar -p 8080 -a
> grizzly-cometd-chat-1.8.0-rc1.war
> 4. Opened http://localhost:8080/
>
>
>
> Both machines are have jdk1.6.0_06 and jre1.6.0_06 with Windows XP
> professional SP2. Is there anything special I’m doing wrong? I tried IE
> 7.0, Firefox 3.0, Safari and Opera. I get the Cometd Chat form in all
> cases and I’m able to enter my username and some text but nothing is
> displayed in the chat div. Is there a tutorial on how to debug the
> cometd Bayeux grizzly server?

What is the url you have used? I've just tried and it works for me:

> ja120114_at_ja120114-desktop:~/appserv80/grizzly/tags/1_8_0/modules/bundles/cometd$ java -jar target/grizzly-cometd-webserver-1.8.0.jar -p 8080 -a /appserv80/grizzly/tags/1_8_0/samples/comet/cometd-chat/target/grizzly-cometd-chat.war
> Running from: /tmp/grizzly-cometd-chat
> 23-Jun-2008 10:34:16 AM com.sun.grizzly.standalone.cometd.Cometd createSelectorThread
> INFO: Enabling Grizzly Bayeux support.
> 23-Jun-2008 10:34:17 AM com.sun.grizzly.http.SelectorThread displayConfiguration
> INFO:
> Grizzly configuration for port 8080
> maxThreads: 5
> minThreads: 5
> ByteBuffer size: 8192
> maxHttpHeaderSize: 8192
> maxKeepAliveRequests: 256
> keepAliveTimeoutInSeconds: 30
> Static File Cache enabled: false
> Static resources directory: /tmp/grizzly-cometd-chat
> Adapter : com.sun.grizzly.cometd.standalone.CometdAdapter
> Thread Pool (Pipeline): com.sun.grizzly.http.LinkedListPipeline
> Asynchronous Request Processing enabled: true
> Server started in 1388 milliseconds.

On the browser side, I did:

http://IP:8080/index.html

A+

-- Jeanfrancois




>
>
>
> - Bjarki B
>
>
>
>
>