>>> Inderpreet Singh <[EMAIL PROTECTED]> 12-Jul-00 10:34:39 PM
>>>
>Why do we need to call super.init() in the init() method
>of our servlet?? and should it always be at the first line of
>our init()?
There's no need (that I'm aware of) to call super.init().
There *is* a need to call super.init(sc) in the version of the method
that takes initialization parameters.
You need to call it because otherwise the call will not cascade down
to the HttpServlet and the GenericServlet.
It is essential to have the call cascade down. To work out why check
the source code for the GenericServlet in the Servlet API.
I suppose that it needn't always be the first method but if it isn't
you run certain risks. Check the GenericServlet to see why.
(hint: there are somethings you can't do before you call
super.init(sc));
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html