Servlets in breif
A servlet is a Java technology based web component, managed by a container, that generates dynamic content. A servlet can be considered as a tiny Java program which processes user request and generates dynamic content.
Following are the some advantages of using servlets.
(1) They are generally much faster than CGI scripts.
(2) They use a standard API that is supported by many web servers.
(3) They have all the advantages of the Java programming language, including
ease of development and platform independence.
(4) They can access the large set of APIs available for the Java platform.
What is a Servlet Container?
Servlet container (also known as servlet engine) is a runtime environment, which implements servlet API and manages life cycle of servlet components.Container is responsible for instantiating, invoking, and destroying servlet components.One example of container is Apache Tomcat which is an opensource container.