How does the JVM execute a servlet compared with a regular Java class?
Servlets are standard Java classes and are executed by the Java Virtual Machine in exactly the same way as any other. However, the environment or context in which servlets are executed is different. A servlet is not invoked directly through a main method, the class is loaded and run by a servlet container.