Meaningless Drivel is fun!*
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: 41106
    
  45
"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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why don't we use main() in Servlet,Jsp?
 
Similar Threads
Diff Between Servlet and JSP
jsp Beans?
MVC architecture
MVC - Controller
difference between jsp and servlet