Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

super.init() still troubling??

 
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: 13062
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