It's not a secret anymore!
The moose likes Servlets and the fly likes why s there an init() method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

why s there an init() method?

stalin tyagi

Joined: Mar 26, 2008
Posts: 1
hi guys,

I m totally newbee to servlet .And reading headfirst servlet and jsp .wan 2 know why s there an init() method?Why isn't constructor enough 4 initializing a servlet?
thanks in avdance
nd HAPPPY NEW YEARS..............
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Covered in the Servlets FAQ.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: why s there an init() method?
jQuery in Action, 3rd edition