• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

frank help!!again

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi frank,
thanks for your reply.i will also take care now in lower-upper
case in java.
now,what i have understood in "super.init(ServletConfig s1)"
is that if you give this method in a sub-class of Generic
class than s1 is stored as a refrence in generic class.this s1
contains all the initializaton parameters and also
ServletContext() object.
super.init() is a must because getServletConfig() method returns the same ServletConfig object,which we have passed through the
init() method of the subclass.
please explain to me how ServletContext() palys a role in this
process.
how a method like getInitParameter() which is called with a
ServletConfig Reference is called on its own after this(
super.init()) method.
is this because now the getInitParameter() on its own find out
that there is a ServletConfig() refrence passed to the Generic
class or it is a method that can be called on itself().
i hope i am clear this time.please explain to me ,if possible
in steps ,how this works.
i will be highly obliged.
thanking you,
asheet
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The important thing to notice is that your call to getInitParameter() is made to the current class. The current class is your servlet, which extends HttpServlet, which extends GenericServlet. Neither your class nor HttpServlet override the getInitParameter method, so the call uses the one provided by GenericServlet. The code for GenericServlet might look something like this:

Does this help?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic