Java is also being used as the language to develop server side code for web servers, using the Common Gateway Interface (CGI) of the HTTP protocol. These are called servlets.
-
Servlets follow a standard servlet API defining the interface between the server and the servlet, and are designed to work within the request/response model of HTTP. 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, and have more state capabilities.
-
More generally, servlets play the role of providing middle-tier services between the client and the back-end applications.
|