aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 39578
    
  27
"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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why don't we use main() in Servlet,Jsp?
 
Similar Threads
difference between jsp and servlet
MVC architecture
jsp Beans?
Diff Between Servlet and JSP
MVC - Controller