File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Ques on init Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Ques on init" Watch "Ques on init" New topic

Ques on init

Nikhil Bansal

Joined: Mar 21, 2006
Posts: 21
Hi All,

If in a servlet you are calling init method and passing the ServletConfig object then why is mandatory to call the init method of the superclass.


public void init ( ServletConfig config ) throws ServletException
super.init ( config ); // why is it mandatory


Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Did you check the servlet FAQ?

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
Look at ServletsFaq
I agree. Here's the link:
subject: Ques on init
It's not a secret anymore!