Re: Why servlet application donot have main() method?

In the amount of time you have waited for an answer on this forum you could have searched the internet and found the answer a thousand times over: servlet main method

I have mentioned this in another thread of yours and will do so again here

You really need to learn how to ask questions the right way, and how to utilize all the resources at your disposal. Virtually all of your posts could be answered with a quick web search and a small amount of time reading.

Re: Why servlet application donot have main() method?

Q: What happens if I add a main method to my servlet?
A: It is possible to write a main method for a servlet, but it will not be called by the servlet container, it is not part of the servlet lifecycle process. If you invoke your servlet through the main method using the java command it will behave exactly like a standard Java class, it cannot operate as a Web application in its own right and cannot be addressed using HTTP requests. Servlets must run in a servlet container to deliver Web applications as intended.

=> I am conufesd by this answer as pe this main() and by google search I am not getting satisfactory answer.