Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] examples of WebSockets with CometD 2.9.1 and Jetty 9.2.1?

Hi Simone,
many thanks for your answer, it turns out that my problems were caused by the fact that I am using Guice to assemble my application and it took me a bit longer to get it to work because I couldn't find any examples anywhere.

I have a solution now but I need some time to make it presentable for the community.

I will post it as soon as I have time and maybe you can take a quick look at it in case you see a better solution.


thanks,
Michele



> Michele,


> On Wed, Jul 9, 2014 at 11:34 AM, Michele Rossi <michele.rossi@xxxxxxxxx> wrote:
>> hi,
>> I am trying to set up my CometD server running on Jetty 9.2.1 to support the
>> WebSockets transport.
>> I  found a few bits and pieces online about configuring jetty to enable
>> org.eclipse.jetty.websocket.jsr356 and in code I tried calling
>> WebSocketServerContainerInitializer.configureContext( sctxHd ) but I have
>> had no luck so far.
>>
>> I am interested in finding out how to do it in both code and using the .xml
>> configuration files for my final distribution.
>>
>> Do you know of any straightforward examples that I could follow?

> Distribution wise, there is not much you should do, apart enable the
> http, websocket and deploy (to deploy from $JETTY_BASE/webapps)
> modules:

> $ mkdir jetty-cometd
> $ cd jetty-cometd
> $ java -jar $JAVA_HOME/start.jar --add-to-start=http,websocket,deploy
> $ cp /whereever/cometd-demo-3.0.0.war webapps/
> $ java -jar $JAVA_HOME/start.jar




Back to the top