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 session variable in servlets?

985


What is the difference between forward () and sendredirect () functions in servlet? Explain

988


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

1062


How do you find out what client machine is making a request to your servlet

1017


Can you explain in detail 'javax.servlet' package?

942


How to read request headers from servlets?

1002


How will two or three servlets interact or communicate with each other?

1407


What’s the use of the servlet wrapper classes??

1068


What are the benefits of using servlet over cgi?

988


What are the drawbacks of cgi?

964


What is the process to implement doget and dopost methods?

937


What is httpservlet and how it is different from genericservlet?

1042


Is servlet a framework?

991


Which interface must be implemented by all servlets?

1297


What is the structure of the http response

1124