This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39530
    
  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
jsp Beans?
MVC - Controller
Diff Between Servlet and JSP
MVC architecture
difference between jsp and servlet