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
What is generic servlet class?
What is meant by Servlet? What are the parameters of service method?
What is servlet lazy loading?
What is the difference between the http servlet and generic servlet?
What is the difference between the servlets and cgi programs?
How is a servlet implemented in code?
How do you invoke a servelt?
Define context initialization parameters.
Explain web container.
What do you mean by request dispatcher in servlet? Also explain its methods.
What is servlet in simple terms?
How do we call one servlet from another servlet?
What is the difference between sendredirect() and forward() in a servlet?
How do you configure a centralized error handler in servlets?
Which event is fired at the time of project deployment and undeployment?