This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why don't we use main() in Servlet,Jsp?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic