how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..
Answer Posted / ashutosh
Servlet is instantiated by servlet container by calling
method Class.forName(Servlet class name).newInstance();
First of all Servlet Container looks into the
deployment descriptor(web.xml) .It looks the definition of
Servlet.And Than instantiate it by calling
Class.forName(Servlet class name).newInstance();
Is This Answer Correct ? | 19 Yes | 5 No |
Post New Answer View All Answers
Can we use the constructor, instead of init(), to initialize servlet?
Why the container loads server at the application startup and how?
How httpservlet is different from the genericservlet?
Is that servlet is pure java object or not?
What are the steps that are involved in using the httpservlet class?
What is the life-cycle of servlets?
What do you mean by cgi?
What are different ways for authentication of servlet?
Which protocol will be used by browser and servlet to communicate
When servlet is loaded?
How can the referrer and the target urls be used in servlet?
Describe the phases of servlet lifecycle?
What is Servlets and explain the advantages of Servlet life cycle?
Is it good idea to create servlet constructor?
Servlet is pure java object or not?