File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not main() in servlet

 
bakiyalakshmi dhanraj
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why main() is not written in servlets programs
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is all about 'entry points'

When you call a class from the command line, the entry point into your class is the main method.

When you call a Servlet or JSP, the entry point is the service() method, but by default it then calls the doGet or doPost methods for us, so we use these entry points instead.

Applets have a different entry point, they don't have a main() method either.

EJBs are different again.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic