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 to rectify errors in java servlet while compilation?
What methodology can be followed to store more number of objects in a remote server?
What is cgi and what are its drawbacks?
What are all the protocols supported by httpservlet?
What is java servlet?
What is called Scriptlet?
Explain the role of dispatcherservlet and contextloaderlistener.
Explain session tracking and its importance?
What is the difference between the include() and forward() methods?
What do you mean by cgi in servlet?
List the Different types of servlet?
What is the difference between servlet and filter?
Why is http protocol called as a stateless protocol?
What is the process for chaining servlet?
What is ServletContext object?