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 / neha rajpal
the very first step of creating the servlet is making its
object after until and unless you will not trigger the init
method it will be treated as simple object not the servlet
after triggering the init method it get the servlet config
init parameters and then only it is called as servlet so its
very imp to intiate the init method
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What are the differences between servlet context vs servlet config?
What mechanisms are used by a Servlet Container to maintain session information?
What do you mean by interservlet communication?
How can the session in servlet can be destroyed?
Can filter be used as request or response?
What is the servletconfig object?
Why doesn’t a servlet include main()?
What is servlet api used for conneting database?
How can you run a servlet program?
What is the difference between the http servlet and generic servlet?
What is the
Is tomcat a servlet container?
Explain get and post.
How to get the path of servlet in the server?