Question - Why doesn’t a Servlet include main()? How does it work?
Answer -
Servlets don’t have a main() method. Because servlets are executed using web containers. When a client places request for a servlet, then the server hands the requests to the web container where the servlet is deployed.