Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

super.init() still troubling??  RSS feed

 
asheet anand
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!