How it looks in code (what makes a servlet a servlet)

Note

Notice... no main() method. The servlet’s lifecycle methods (like doGet()) are called by the Container.

image with no caption

Get Head First Servlets and JSP, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.