Hi guys.. Well can u tell me that why there is need of
"init()" , i mean why can not we initialize the servlet object
with the help of constructors?
Thank you.

Answer Posted / gaurav agrawal

If we initialize the servlet via constructor then we cant
access the ServletConfig object at the time of
initialization.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which java framework is most popular?

575


Explain the custom jsp tags and the beans.

613


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

588


Explain the difference between servlet and cgi?

601


How to get the server information in a servlet?

683






What are the advantages of servlets over traditional cgi?

619


How do you communicate in between Applets and Servlets?

589


Explain how to improve Servlet Performance?

594


Describe servlet?

574


What are the differences between servlet context vs servlet config?

575


How do I use cookies to store session state on the client?

528


What are the advantages of Servlet over CGI?

662


What is difference between jsp and servlet?

638


Are Servlets Thread Safe? How to achieve thread safety in servlets?

555


Explain the concept of ssi ?

587