how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..
Answer Posted / suraj kumar
The servlet is controlled by the container in which the servlet has been deployed. When a request is made to a servlet, its mapping is searched in web.xml. If mapping found then the container performs the following steps.
a.If an instance of the servlet does not exist, the Web container loads the servlet class.
b.Creates an instance of the servlet class.
c.Initializes the servlet instance by calling the init method
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain how to improve Servlet Performance?
What are the mechanisms used by a servlet container for maintaining session information?
What is load-on-startup in servlet?
When servlet object is created?
What is cookie? Why is cookie used?
What is a generic servlet?
Which HTTP method is non-idempotent?
How do you create a cookie using servlet?
How we can create war file in servlet?
How can a servlet be used to generate plain text instead of html?
What is the difference between Server and Container?
How do you load an image in a Servlet?
What is difference between cookies and httpsession?
List the Different types of servlet?
What are the differences between the servletconfig interface and the servletcontext interface?