This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Ques on init" Watch "Ques on init" New topic
Author

Ques on init

Nikhil Bansal
Greenhorn

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.

eg:

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


Regards

Nikhil
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ques on init
 
Similar Threads
about GenericServlet
doubt in servlet init method
init() and init(ServletConfig) doubt?
init(ServletConfig config) query
Clarification abt init()