Request handling is the bread and butter of Java web application development. In order to respond to requests from the network, a Java web application must first determine what code will respond to the request URL, then marshal a response. Every technology stack has a way of accomplishing request-response handling. In Java, we use servlets (and the Java Servlet API) for this purpose. Think of a servlet as a tiny server whose job is to accept requests and issue responses.

URL vs endpoint

As an Internet user, you are familiar with URLs as the website address in your browser. As a developer, you might also know URLs as endpoints for web services. A URL (uniform resource locator) is a standard way to describe and locate Internet resources using text. The term endpoint refers to a URL denoting a web service. The terms endpoint and URL are often used interchangeably, although they refer to different usage domains.

To read this article in full, please click here