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

Answer Posted / samik bandyopadhyay

The init() method is only used to initialize an existing
servlet instance before it starts providing service to
requests, it's never used for creating a servlet instance.
I'm searching for the method which creates the servlet
instace. But I can assure that we can't create a servlet
instace, it's done by the container.

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What must be implemented by all servlets?

562


Describe in brief RequestDespatcher?

577


What do you mean by httpservlet?

553


how many jsp scripting elements are there and what are those?

534


Write a servlet to upload file on server.

587






What are the different ways we can maintain state between requests?

559


When to use doget() and when dopost()?

617


Why is http protocol called as a stateless protocol?

523


What is cookie? Why is cookie used?

570


What is the difference between CGI and Servlet?

575


How do you define a servlet?

516


List out difference between a JavaBean from a Servlet?

556


What is servlet instance?

532


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

632


What are the types of servlets? Explain

660