This document provides an introduction to servlets, including:
- Servlets allow Java code to run on a web server and handle HTTP requests and responses. They use a request-response model and common packages include javax.servlet and javax.servlet.http.
- The Tomcat server is the official reference implementation for servlets and JSP. It executes servlets and can be deployed on web servers like Apache HTTP Server.
- Servlets must implement the Servlet interface and have a defined lifecycle of init, service, and destroy methods handled by the servlet container. Common implementations are GenericServlet and HttpServlet.