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

When the methods init() and Distroy() will be called?

Answer Posted / tulasi vani

The servlet life cycle included init() and destroy()(Small
d).

init() is called at the beginning of the servlet,it
performs certain one time activities which are required
during the lifetime of the servlet.It may be some
initialisation of variables or a database connection.

destroy() is called to destroy the servlet.Various
resources which are held by the servlet will be
released,database connections which were opened will be
closed.Later the servlet is destroyed.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the different ways of session tracking.

1081


Why do we need a constructor in a servlet if we use the init method?

1105


What do you mean by request dispatcher in servlet? Also explain its methods.

1214


What are the differences between servlet context vs servlet config?

1144


Why is init() method is used in servlets?

1080


How to handle exceptions thrown by application with another servlet?

1142


What is the use of send redirect () method?

1149


How many objects of a servlet is created?

1318


What is the disadvantage of cookies?

1035


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1082


What are the types of an http request?

1218


What do you mean by chaining in servlet?

1081


What are all the protocols supported by httpservlet?

1355


What is the major difference between servlet and applet?

1060


Why do we use sendredirect() method?

1024