how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..
Answer Posted / suraj kumar
The servlet is controlled by the container in which the servlet has been deployed. When a request is made to a servlet, its mapping is searched in web.xml. If mapping found then the container performs the following steps.
a.If an instance of the servlet does not exist, the Web container loads the servlet class.
b.Creates an instance of the servlet class.
c.Initializes the servlet instance by calling the init method
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are the uses of servlet
What is new in ServletRequest interface ? (Servlet 2.4)
What's the architecture of a servlet package?
What are the differences between forward() method and sendredirect() methods?
What is the difference between Server and Container?
What is the difference between the http servlet and generic servlet?
How many servlet objects are created?
What is java servlet?
Which HTTP method is non-idempotent?
Explain servlet life cycle?
What is SingleThreadModel interface?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
How to create war file?
What is a servlet-to-servlet communcation?
Explain the concept of ssi ?