简体   繁体   中英

Enable JSR356 with jetty-runner

I developed a Java server application (spring+hibernate) that use websockets. When I run the app with jetty-maven-plugin all works fine, but if I try to run my application with jetty-runner, then seems that JSR356 are not enabled.

To load my app I run: java -jar c:\\jetty.jar --port 8083 --path gateway gateway

Is supposed JSR356 included into jetty-runner? In the opposite case how I can enable it?

Thanks very much

Nope, JSR-356 is not included in the jetty-runner.

Your choices:

  • Use jetty-distribution
  • Manage the classpath yourself, including the relevant JSR-356 jars (apis + impls)
  • Make your own embedded-jetty launcher

Just to add to what Joakim mentioned, you can use the jetty websockets implementation instead of the JSR-356 one with jetty-runner if JSR-356 support isn't a hard requirement.

I just went through this exercise to get a cometd application running on Heroku so I can confirm that it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM