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
How do we call one servlet from another servlet?
Can we use threads in Servlets?
What are different ways for authentication of servlet?
What if we pass negative value in load-on-startup?
What are different ways for servlet authentication?
What are the steps that are involved in using the httpservlet class?
What’s the use of the servlet wrapper classes??
Why is httpservlet declared abstract?
What are the types of servlets? Explain
What is a cookie What is the difference between session and cookie
Define the lifecycle for executing a jsp page.
What are the objects involved when a servlet receives a call from client?
What is cookies in servlet with example?
Is java servlet still used?
How can you use a servlet to generate a plain text instead of html?