I hope all readers, whether novice or professional, can understand and appreciate what we mean by saying a HTTP service, otherwise most probably they will not be reading a text book like this. Hence, I will choose a HTTP service for demonstration purposes here.
A HTTP service is a network service accessible through the HTTP protocol. Servlets are the simplest components available in Java with which we can build HTTP service, and hence we will use that here. Assuming that the reader is familiar with servlets and how to deploy a HTTP service in their favorite web container such as Tomcat, only the major steps are listed here. For further details the reader is encouraged to refer to any available servlet technology books.
As the first step, we will build and deploy a very simple servlet. The servlet code is given as follows:
public class WelcomeServlet extends HttpServlet { public static final String XML_CONTENT...