We now turn our attention to servlets. Servlets are Java classes that can be loaded dynamically and run by a Java-enabled Web server. The Web server provides support for servlets with extensions called containers (also known as servlet engines).
Web clients (Web browsers) interact with the servlet using the HTTP request/response protocol that has been described earlier.
The servlet container provides the following services and functionality:
The network services over which the requests and responses are sent.
Registers the servlet against one or more URLs.
Manages the servlet lifecycle.
Decodes MIME-based requests.
Constructs MIME-based responses.
Supports the HTTP protocol (it can also support other protocols). ...