This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes super.init() still troubling?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "super.init() still troubling??" Watch "super.init() still troubling??" New topic

super.init() still troubling??

asheet anand
Ranch Hand

Joined: Nov 15, 2000
Posts: 83
hi everyone,
could you please explain to me how super.init(s1),where
s1 is a serverconfig refrence works?
how getinitparametres() is invoked without using s1 in the subclass which use getinitparameters() when super.init() is used?
please explain me in steps:
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13007
super.init(s1),where s1 is a serverconfig refrence
Is required to initialize variables in the super class of your servlet - typically GenericServlet or HttpServlet.
If you don't do this, your ServletContext won't have a ServletConfig. It is the ServletConfig that provides the data for methods such as:

author of:
I agree. Here's the link:
subject: super.init() still troubling??
It's not a secret anymore!