• Post Reply Bookmark Topic Watch Topic
  • New Topic

Starting point of a servlet.  RSS feed

 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Reader,
What is the main() method of a servlet.
Thank you
Garandi
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets have no main() method. The first method called on a servlet by the web container is init(ServletConfig)
Raffi
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main() method can be added to a servlet, however. In this way, you can run your servlet as you would any other class with a main() method. This is not the best use of a servlet however.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!