Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 10 websocket API changes

Hi Silvio,

You do not need to start any of the components manually or call ensureContainer. 
The `JettyWebSocketServletContainerIntializer` is what sets up the various websocket components for Jetty to use. 

If you are using the jetty-home you can enable the Jetty WebSocket module:
$ java -jar $jETTY_HOME/start.jar --add-modules=websocket-jetty

If you are using embedded Jetty, the ServletContainerInitializer won't be discovered and you will need to set it up with:
JettyWebSocketServletContainerInitializer.configure(contextHandler, null);

The ServletContainerInitializer will then run on startup and configure all the components you need to use websocket. 

Back to the top