Explain life cycle of a Servlet?

Answers were Sorted based on User's Feedback



Explain life cycle of a Servlet?..

Answer / janet

1. a server loads and initializes the servlet by init()
method.
2.the servlet handles zero or more client's requests
through service() method .
3. the server removes the servlet through destroy() method.

Is This Answer Correct ?    9 Yes 1 No

Explain life cycle of a Servlet?..

Answer / venky

the object of servlet is created in the init mehod by server

request of the client is processed in service method

the servlet is discarded from thr server by destroy method

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Servlets Interview Questions

without session Id can we do any operations like add,update,edit,delete. I saw Session id is loaded for edit and delete action not for add .so am asking this

1 Answers   Syntel,


Why do we need servlet filter?

0 Answers  


Are Servlets Thread Safe? How to achieve thread safety in servlets?

0 Answers  


What is servlet container. how it works?

0 Answers  


What is difference between PrintWriter and ServletOutputStream?

0 Answers  






Can a jsp be called using a servlet?

0 Answers  


Define the servlet mapping.

0 Answers  


What is the default HttpRequest method?

6 Answers  


What is Servlet API used for connecting database?

0 Answers  


What is the purpose of dispatcherservlet properties?

0 Answers  


What is the workflow of a servlet?

0 Answers  


What is servlet context ?

4 Answers  


Categories