Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What will happen inside init() in servlet. my interviewer
asked servlet lifecycle. i said "once servlet is loaded in
to memory init() will be called which performs servlet
initialization " . Again interview asked what values will be
initialized . what is difference between init() and
init(ServletConfig config).

Answer Posted / manidhar

Your superclass includes two versions of init(),one that
takes a ServletConfig and a convenience version thats no -
arg. The3 inherited init(ServletConfig) method calls the no-
arg init method, so the only one u need to override is the
no-arg version.
no law that stops u from overriding the one that takes a
ServletConfig,but if u do then u better call super.init
(ServletConfig) but theres really NO reason why u need to
override the init(SC) method, since u can always get ur
ServletConfig by calling inherited getServletConfig()
method.
correct me if am wrong

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is abstraction implemented in java ?

935


What is the best way to findout the time/memory consuming process?

994


Difference between stack and queue?

1035


What do you mean by access modifier?

980


Mention some interfaces implemented by linked list in java.

992


Can an interface extend another interface?

1021


What is java object name?

954


Why do we need wrapper classes?

1032


What is a vector in java?

984


How to make a non daemon thread as daemon?

1031


How can we make a class virtual?

1077


What is classpath?

975


What purpose do the keywords final, finally, and finalize fulfill?

1063


How many types of equations are there?

977


What does those terms actually mean included in the j.d.k i.6?

2085