Which method the Servlet container call to create the
instance of the servlet?

Answer Posted / arun

the servlet container will call only init() method and it
will not create any instance of the servlet,it will pass
initialization parameters to the init() method,it is called
(i.e init() method ) before the servlet, services any
request.only once in the life cycle of sevlet this init()
method is called.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by mime type?

774


What is a server side include (ssi)

777


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

770


How is the get () method different from the post() method?

732


What is new in ServletRequest interface ? (Servlet 2.4)

782


What is a servlet-to-servlet communcation?

864


What exactly is a servlet?

713


What if you need to span your transaction across multiple servlet invocations?

802


What is servlet container?

875


Can you send an authentication error from a servlet?

730


Write a program to show the functionality of servlets.

744


How printwriter is different from servletoutputstream?

773


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

767


Is it possible to have a constructor inside the servlet?

737


How do I support both get and post from the same servlet?

944