permaculture playing cards*
The moose likes Servlets and the fly likes why don't we use main() in Servlet,Jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "why don Watch "why don New topic
Author

why don't we use main() in Servlet,Jsp?

rex tony
Ranch Hand

Joined: Aug 29, 2007
Posts: 159
why don't we use main() in Servlet,Jsp?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42055
    
  64
"main" is a method called when Java classes are invoked using the "java" executable. Since servlets and JSPs are invoked by the servlet container through the lifecycle methods defined in the Servlet interface, there is no place for it.


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: why don't we use main() in Servlet,Jsp?