Michele, On Wed, Jul 9, 2014 at 11:34 AM, Michele Rossi <[email protected]> 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 You can find a simple example of how to setup the same in code here: https://github.com/cometd/cometd/blob/master/cometd-demo/src/test/java/com/webtide/demo/auction/Demo.java -- Simone Bordet ---- http://cometd.org http://webtide.com http://intalio.com Developer advice, training, services and support from the Jetty & CometD experts. Intalio, the modern way to build business applications. _______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
