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 / neha rajpal

the very first step of creating the servlet is making its
object after until and unless you will not trigger the init
method it will be treated as simple object not the servlet
after triggering the init method it get the servlet config
init parameters and then only it is called as servlet so its
very imp to intiate the init method

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

1028


What are the differences between servlet context vs servlet config?

1078


What mechanisms are used by a Servlet Container to maintain session information?

1158


What do you mean by interservlet communication?

1064


How can the session in servlet can be destroyed?

1177


Can filter be used as request or response?

959


What is the servletconfig object?

1035


Why doesn’t a servlet include main()?

1041


What is servlet api used for conneting database?

1223


How can you run a servlet program?

1080


What is the difference between the http servlet and generic servlet?

1133


What is the element?

1049


Is tomcat a servlet container?

1037


Explain get and post.

1104


How to get the path of servlet in the server?

1005