RESTful web service is an architectural pattern.
A convenient way to implement it in the java world is using servlets, since both cater to the HTTP protocol.
But it's not the only way. RESTful services can exist outside a servlet container, unlike servlets...it is possible to implement them using plain sockets and deploy them standalone.
Joined: Sep 30, 2011
Thank you for your reply.
Karthik Shiraly wrote: RESTful services can exist outside a servlet container, unlike servlets...it is possible to implement them using plain sockets and deploy them standalone.
How it is possible with out using the container implement the restful services?
Joined: Apr 04, 2009
I didn't get your question. Are you asking how is it possible in principle, or are you asking how to do it using some specific framework?
In principle, as already mentioned, a standalone process can bind to some port using sockets, receive RESTful HTTP requests on it, and reply back with HTTP responses.
A framework like Jersey already supports this.