Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the two important api's in for servlets?

1139


Explain the role of dispatcherservlet and contextloaderlistener.

1263


Why do we have servlet filters?

1080


What is servlet in tomcat?

1104


What is the type of method for sending request from http server?

1182


How can we perform any action at the time of deploying the project?

1169


Which java framework is most popular?

1219


Why HttpServlet class is declared abstract?

1284


Servlet is pure java object or not?

1243


Define declaration.

1125


What are advantages of servlets over cgi?

1163


Explain url encoding in servlet?

1106


Explain the architechure of a servlet?

1166


How many servlet objects are created?

1123


How can we refresh automatically when new data has entered the database?

1169