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

What is the process for chaining servlet?

687


What do you mean by session tracking?

766


What are the jobs performed by servlets?

671


What are the types of protocols supported by httpservlet ?

791


What is difference between GenericServlet and HttpServlet?

643






What are the drawbacks of cgi?

649


What is httpservlet class?

631


How to get the IP address of client in servlet?

717


What is cookie in servlet?

671


Differentiate between the get and post method

666


Difference between GET and POST?

794


What are all the advantages of servlet over cgi?

682


What are the functions of an intercepting filter?

574


Can we override servlet service method?

680


What is a generic servlet?

598