jersey and jax-rs RI2 - missing HttpServerFactory

前端 未结 3 877
日久生厌
日久生厌 2021-02-05 23:16

I have a simple project to test JAX-RS services. Yesterday I downloaded jersey-1.7.1 and used com.sun.jersey.api.container.httpserver.HttpServerFactory and com.sun.net.httpserve

相关标签:
3条回答
  • 2021-02-05 23:40

    You can also get the bundle from here http://mvnrepository.com/artifact/com.sun.jersey/jersey-server/1.2 Just add it to your library folder then right click on it in the project and select "Add as a library."

    0 讨论(0)
  • 2021-02-05 23:57

    Pls try this Grizzly 2 bundle http://search.maven.org/remotecontent?filepath=org/glassfish/grizzly/grizzly-http-servlet-server/2.3.3/grizzly-http-servlet-server-2.3.3.jar

    0 讨论(0)
  • 2021-02-06 00:04

    You could use the JdkHttpServerFactory, which is available in the jersey-container-jdk-http-2.0.jar:

    ResourceConfig rc = new ResourceConfig(HelloWorldResource.class);
    HttpServer server = JdkHttpServerFactory.createHttpServer(baseUri, rc);
    

    No need to call server.start()!

    0 讨论(0)
提交回复
热议问题