Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] configuration of Jetty for JSR-356

Hi All,

I'm using Jetty 9.1.0.RC0 from maven and would like to use JSR-356 websockets, but i'm a little confused about what i need to do to make this work.

I've found this example which shows programmatic configuration - http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/examples/embedded/src/main/java/org/eclipse/jetty/embedded/WebSocketJsrServer.java?h=jetty-9.1

With these magic lines:
ServerContainer wsContainer = WebSocketServerContainerInitializer.configureContext(context);

// Add your websockets to the container
wsContainer.addEndpoint(EchoJsrSocket.class);


But i'm launching from maven using the jetty plugin so not quite sure how that should fit into things.

Do i need a startup listener or something? Or is there some XML to do the config? I'm guessing it would need to go into my pom.xml, rather then web.xml

Thanks,
Brad

Back to the top