File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes frank help!!again Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "frank help!!again" Watch "frank help!!again" New topic
Author

frank help!!again

asheet anand
Ranch Hand

Joined: Nov 15, 2000
Posts: 83
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
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
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?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: frank help!!again