Question: what is difference between web service and servlet?
Answer: Servlets are API which is simple and provides capabilities to write server side components. Web Service uses ServletContainer class which is again a Servlet class, which handles the request in clean and structured way. The REST stands for REpresentational STateless Protocol. Here the request won't store any data.