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
Why doesn’t a servlet include main()? How does it work?
How can you use a servlet to generate a plain text instead of html?
What is httpservlet and how it is different from genericservlet?
Which protocol will be used by browser and servlet to communicate
Explain jsessionid?
Name the different ways of session tracking.
Differentiate between get and post?
What is the difference between jsp and servlet life cycle?
What is Servlets and explain the advantages of Servlet life cycle?
What is servlet and its types?
What is meant by Servlet? What are the parameters of service method?
Where do you define dispatcherservlet?
Explain the difference between generic servlet and http servlet?
What is the structure of the http response
Is that servlet is pure java object or not?