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 are the functions of an intercepting filter?

885


What is the directory structure of a war file?

1111


Which event is fired at the time of project deployment and undeployment?

1260


What is pure servlet?

1163


What are common tasks performed by Servlet Container?

1207


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

988


What is a deployment descriptor?

1047


What is the use of httpservletrequestwrapper?

1040


How we can get ip address of client in servlet?

939


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

1028


What are different ways for authentication of servlet?

1009


What if we pass negative value in load-on-startup?

1230


Explain the difference between servlet and cgi?

1107


How do you invoke a servelt?

1062


Explain get and post.

1056