private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
To enable Websocket, you need to enable the
Once this module is enabled for your Jetty base, it will apply to all webapps deployed to that base. If you want to be more selective about which webapps use Websocket, then you can:
false. This will mean that websockets are not available to your webapp, however deployment time scanning for websocket-related classes such as endpoints will still occur. This can be a significant impost if your webapp contains a lot of classes and/or jar files. To completely disable websockets and avoid all setup costs associated with it for a particular webapp, use instead the context attribute
org.eclipse.jetty.containerInitializerExclusionPattern, described next, which allows you to exclude the websocket ServletContainerInitializer that causes the scanning.
org.eclipse.jetty.containerInitializerExclusionPattern context attribute to include
Here’s an example of doing this in code, although you can do the same in xml:
WebAppContext context = new WebAppContext(); context.setAttribute("org.eclipse.jetty.containerInitializerExclusionPattern", "org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer|com.acme.*");