A servlet is a Java program that is run by a Web server.
|
Servlets follow a standard servlet API defining the interface between the server and the servlet, and are designed to work within a request/response model. The servlet API is part of the standard extensions of JDK.
|
Servlets can provide all the services of standard CGI, but are platform-independent, i.e. they can be used with any server implementing the API.
|
More generally, servlets play the role of providing middle-tier services between the client and the back-end applications.
|
References:
|