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

Is static a keyword in java?

917


What is a return in java?

975


How listener identify that the event came from a particular object?

1950


What is a final class ?

1080


What is the vector class in java programming?

1004


What is the purpose of sizeof operator?

977


Define Multiprogramming and Multiprocessing in java.

1063


What is the use of http-tunneling in rmi?

1001


What are the types of sockets in java?

1055


What are the two types of exceptions in java? Which are the differences between them?

1035


Explain notifyall() method of object class ?

1044


What is the common usage of serialization? What exceptions occur during serialization?

1044


Name some classes present in java.util.regex package.

980


Explain 5 features introduced in jdk 1.7?

968


What is an argument in java?

893