Explain life cycle of a Servlet?
Answers were Sorted based on User's Feedback
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 |
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 |
Write a command to get actual path of a servlet to the server?
Explain url encoding in servlet?
Why servlet is used as controller ? Not JSP? I want complete explation?
What are the ways to handle multi-threading in servlets?
i have class files in class folder. but i have no java files. but i want to modify the java files which are related to class files . how ?
What is the role of the webserver?
How native code can be used in a servlet?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
Explain url encoding?
Explain how to improve Servlet Performance?
How printwriter is different from servletoutputstream?
How will you open a new page after certain interval of time (5 sec), on clicking of a button in an html page?