This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes main() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "main()" Watch "main()" New topic
Author

main()

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
Why does servlet not have main method ?
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

The question is "why should a servlet have a main() method?"

A servlet is usually managed by a servlet container and it's not a standalone application. So there's no reason for it to have a main() method.

Marco
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Please go back and change your post to add a more meaningful subject by clicking the .


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: main()
 
Similar Threads
First GUI program
WA #1.....word association
java.lang.NoSuchMethodError
run time error
packaging runme.jar