Servlet is a java program, exist and executes in j2ee servers, used to received the http protocol request, process it and send response to client.
Using Servlet, we can collect input from users through web page forms, present records or another source, and create web pages dynamically.
The Servlet specification was created by Sun Microsystems, with version 1.0 finalized in June 1997. The version 2.3, developed under the Java Community Process.
Before reading Servlet you need basic knowledge of Core java and most important some topics are required like Abstract, Interface, Exception Handling, Collection Framework etc.