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
What is Client-Server Computing?
How httpservlet is different from the genericservlet?
What is ServletConfig object?
How do we translate jsp?
How can you start a jta transaction from a servlet deployed on jboss?
What is the use of httpservletresponsewrapper?
Why don't we write a constructor in a servlet?
How servlets are deployed in java?
What do you mean by request dispatcher in servlet? Also explain its methods.
What is the
What is java servlet?
What is servlet and its life cycle?
What is the servlet?
How do I support both get and post from the same servlet?
What is cookies in servlet with example?