how a servlet is instantiated, whether the container calls
init() or by calling any other method? please somebody reply..

Answer Posted / harikumar

if we deploy our web root dir in webapps , then we call url
from the browser.
then after loading , it calls the init() method first.
There r two tow init() methods(first init() & second init
()).

Is This Answer Correct ?    2 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the directory structure of a war file?

893


What is a server side include (ssi)

760


How the typical servlet code look like ?

846


What is a web application and what is it’s directory structure?

791


Is dispatcher servlet a singleton?

725


What is context in servlet?

738


What are the different methods involved in the process of session management in servlets?

887


What is the functionality of actionservlet and requestprocessor?

779


Tell us something about servletconfig interface.

751


What is the use of servletconfig interface?

747


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

765


What are the new features added to servlet 2.5?

809


Which HTTP method is non-idempotent?

788


What are the annotations used in servlet 3?

744


What is servlet collaboration?

860