what is servlet life cycle?

Answer Posted / anu

There are 3 methods in servlet life cycle:init(),service
(),destroy().
whenever servlets loads,init() method is invoked.init
()invokes only once in whole life cycle.then service()
method is invoked which handles all the Http requests and
correspondingly generate Http response.Finally service()
method is invoked for unloading the servlet.this method is
also invoked only once.

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whether we can get deadlock situation in servlets?

551


What is a servlet engine?

522


Is servlet a controller?

552


Explain the jar and war files in servlet?

535


How do you create a cookie using servlet?

556






what is servlet chaining?

602


Explain how does JSP handle run-time exceptions?

566


What are the common methods that are included in the http servlet class?

552


What is the process to implement doget and dopost methods?

522


What is servlet initializer?

487


How are filters?

555


When servlet object is created?

574


What is Request Dispatcher?

767


What is the difference between get and post methods?

577


What is meant by cookies?

590