This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "super.init() still troubling??" Watch "super.init() still troubling??" New topic
Author

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:
bye
asheet
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
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:
getInitParameters();
Bill

------------------
author of:
 
wood burning stoves
 
subject: super.init() still troubling??