When we don't write any constructor for the servlet, how
does container create an instance of servlet?

Answer Posted / mahesh

Container creates instance of servlet by calling
Class.forName(className).newInstance().

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by deployment descriptor?

746


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

774


What are all the advantages of servlet over cgi?

793


Why servlet is used as controller ? Not JSP? I want complete explation?

878


Write a program to show the functionality of servlets.

740


What do you mean by session tracking?

900


What do you mean by request dispatcher in servlet?

859


What is a servlet-to-servlet communcation?

853


What methods do you use in servlet - applet communication?

791


What are the different types of servlets?

731


what do you understand by url rewriting?

702


Explain the role of dispatcherservlet and contextloaderlistener.

868


Can we use the constructor, instead of init(), to initialize servlet?

819


What do you mean by cgi in servlet?

805


What are the various ways of session supervision in servlets?

738