File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Not using Maiin() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Not using Maiin()" Watch "Not using Maiin()" New topic

Not using Maiin()

Anto Telvin
Ranch Hand

Joined: Aug 12, 2008
Posts: 113
I understood that every servlet is a java class only ..But why we are not using any main() to start the loading of class ?


Anto Telvin Mathew<br />Many of the life failures are people who did not realize how close they were to success when they give up. EDISON
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63542

main() is used to start applications, not servlets.

P.S. please fix the typo in your subject.
[ August 14, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
benjamin muktesh

Joined: Jul 01, 2008
Posts: 24
The main() method acts as an entry point to the java program.
The servlet container takes care of this in case of a servlet.
Do a bit of reading on java class loaders.
I agree. Here's the link:
subject: Not using Maiin()
It's not a secret anymore!