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
How many servlet objects are created?
What are the different methods involved in generic servlet?
What mechanisms are used by a Servlet Container to maintain session information?
What are advantages of servlets over cgi?
List out the difference between ServletConfig and ServletContext?
Explain the difference between servletconfig and servletcontext in servlet?
What is webservlet?
Why do we have servlet filters?
What do you mean by session tracking and also explain its techniques?
How to get the server information in a servlet?
How is a servlet implemented in code?
What’s the difference between sendredirect and forward methods
What is the purpose of requestdispatcher interface?
What is the difference in between the httpservlet and generic servlet?
What are session variable in servlets?