Hi,
Yes, you are right ......servlet has no main method but still how it runs.................
That's why servlet need help to start or invoke the servlet.
So servlet need program that invoke the servlet. Then
tomcat or say container comes into the picture.
container is a program that invoke the servlet by passing sevlet config object.
That sevlet config object pass to init() method of servlet and create or initialize servlet and class object acquired all the property of servlet.
That's way it makes servlet.