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

What is the life cycle of Servlet?

Answer Posted / shaik baji

Servlet life cycle contains the following steps in it:

step 1: When the first request comes to the servlet, the
container will load the servlet if and only if the user is
not specified <load-on-startup> tag in web.xml

step 2: The container will instantiates the servlet

step 3: The container will invoke the init() method of the
servlet with the ServletConfig as a parameter

step 4: The container will create the thread for that
request and invokes the service() method

step 5: Once the service method execution is completed the
container will invoke the destroy() method to release the
Servlet object.

Step 6: The servlet will unloaded from container when the
web server or the web application is getting shutdown.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is bigger float or double java?

978


What is a instance variable?

1062


What is the purpose of void class?

1064


What do you understand by casting in java language?

1029


What are the parts of methodology?

974


Explain public static void main(string args[]).

1180


Are static members inherited to sub classes?

1140


What is the use of conditional statement?

985


What is null mean in java?

1097


What’s the difference between the methods sleep() and wait()?

1012


What happens if we don’t define serial version uid?

1028


what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread

984


How is tree Mirroring implemented?

1078


how to run ecllipse with jettyserver for windows environment using batch file

2088


What is the difference between a factory and abstract factory pattern?

1144