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...

Hi guys.. Well can u tell me that why there is need of
"init()" , i mean why can not we initialize the servlet object
with the help of constructors?
Thank you.

Answer Posted / archana

When u create a servlet with a constructor it wont be a
complete servlet but will be in a akward state where it
cannot access Servlet Context and Config.It has to go
through the init() method (though we dont know what code is
written there) to be a complete servlet

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the servlet filter.

937


List some life cycle methods of a servlet.

1016


Explain the different ways for servlet authentication?

1047


What is the purpose of requestdispatcher interface?

1009


What do you mean by the servlet chaining?

1018


What is difference between jsp and servlet?

1128


What do you mean by scope object and what are its types?

1029


What is the directory structure of a war file?

1116


How can you start a jta transaction from a servlet deployed on jboss?

1115


How to find whether a parameter exists in the request object?

1064


Describe servlet?

989


What are the different session tracking techniques?

1153


How the servlet is loaded?

1025


What is meant by Servlet? What are the parameters of service method?

1016


What methodology can be followed to store more number of objects in a remote server?

2225