I am trying to find an easy way to publish my RESTful web service using JAX-RS 2.0 with Java SE using Jersey and / or the Java SE embedded HTTP server.
I want my dependencies to be minimal, so I wanted to avoid the grizzly bear and also did not want to use an external application server.
Can you tell me how to publish a leisure service with these requirements?
Thanks in advance,
I want to achieve something like this:
public static void main(String args[]) { try { final HttpServer server = GrizzlyHttpServerFactory.createHttpServer("http://localhost:8080/calculator/",new ResourceConfig(SumEndpoint.class)); System.in.read(); server.stop(); } catch (IOException ex) { }
}
... but avoiding the grizzly addiction
source share