I am designing a small component for an application. The role of this component is to provide a HTTP Endpoint for the user requests and also return back the response.
My question is, do I have to have serve the requests/response through a servlet?? In case if it happens to be Servlet, Am I compelled to deploy it on a full stack Application Server. The reason being I do not have large volume of data to handle.
I am looking for simple solution in this regard, I would request if anyone could help me on this.
Well if you want to stay in Java world, I would recommend you Spring Boot which provides embedded HTTP server (Tomcat, Jetty...) in your application. So you don't depend on any external application server. It is very simple (main-method like) implementation and will give you everything you possibly need (with Spring included).
If you don't want to have Spring included, you can use plain Tomcat/Jetty. That is also valid but Spring Boot may be useful for you as it gives you utilities you may need/like (now or in future).
There is also option to go with HttpServer implementation from com.sun package but I would use this only if I would be sure that Oracle Java will be used.
Just to note, I feel that days of "external" application servers are coming to an end. Even ThoughtWorks in their Technology radar put Application Servers to Hold (Hold = We don't have an "avoid" ring, but we do throw things in the hold ring that we wish our clients wouldn't use).