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 / archana
When u create a servlet with a constructor it wont be a
complete servlet but will be in a akward state where it
cannot access Servlet Context and Config.It has to go
through the init() method (though we dont know what code is
written there) to be a complete servlet
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How many objects of a servlet is created?
How to read request headers from servlets?
Which is the methods of generated servlet?
What is a servlet context object?
How can you run a servlet program?
Can we override servlet service method?
What is a server side include (ssi)
How do you design microservices?
Explain the difference between jsp and servlet?
Why filter is used in servlet?
What are the benefits of using servlet over cgi?
What is a deployment descriptor?
What is the difference between jsp and servlet life cycle?
What is the web server used for running the Servlets?
Why do we have servlet wrapper classes?