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 / abhijit mishra

As per Servlet specification, the servlet container is
responsible for creating the servlet and initializing it( or
making it ready for client to request it).

So according to the Client:servlet container contract, the
servlet creation and inialization is done by the container
which will differ for different container provider.

So u can't use constructors to create servlets.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different session tracking techniques?

1192


What is servlet in simple terms?

1015


What is servlet and list its types?

1054


What is dispatcher servlet?

1061


What is the advantage of Servlets when compared with other server side technologies?

2341


What is servletconfig?

1026


What are its drawbacks of cgi?

1114


Explain the differences between jsp and servlet.

988


Why do we have servlet listeners?

1065


What methods do you use in servlet - applet communication?

1039


Explain the features are in servlet 3?

1045


How can we invoke another servlet in a different application?

1205


Define context initialization parameters.

1027


When a servlet accepts a call from a client, it receives two objects. What are they?

1235


What is the structure of the http response

1168