Creating a RESTful WebService without using Jersey or any other libs

后端 未结 2 983
生来不讨喜
生来不讨喜 2021-02-07 23:48

okay you might say its a duplicate of this.

It might be but the answer is still yet to be found.

Isn\'t there any way we can make a RESTful web service without u

2条回答
  •  逝去的感伤
    2021-02-08 00:32

    If you want to use JAX-RS, which is a specification, you must use an implementation of this specification. Jersey is the Reference Implementation of JAX-RS but any other implementation is fine, too.

    You can write a service with a RESTFul interface using plain Servlets. But why reinvent the wheel? You really don't want to do this. But if you must, read the Java EE Tutorial on Servlets. But a Servlet will not be RESTFul without further work. You can easily fall into the trap of writing a RPC-style service.

提交回复
热议问题