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
What are the mechanisms used by a servlet container for maintaining session information?
Why do we use sendredirect() method?
Difference between java beans & servlets?
What’s the difference between sendredirect and forward methods
What is the use of attribute in servlets?
Difference between GET and POST?
What are the advantages of cookies?
What is servlet looping or chaining?
What are the new features added to servlet 2.5?
What is the difference between CGI and Servlet?
What are the jobs performed by servlets?
What are the common methods that are included in the http servlet class?
What are the servlet events?
What mechanisms are used by a Servlet Container to maintain session information?
Difference between forward() method and sendredirect() method ?