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 are the functions of an intercepting filter?
What is the directory structure of a war file?
Which event is fired at the time of project deployment and undeployment?
What is pure servlet?
What are common tasks performed by Servlet Container?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What is a deployment descriptor?
What is the use of httpservletrequestwrapper?
How we can get ip address of client in servlet?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
What are different ways for authentication of servlet?
What if we pass negative value in load-on-startup?
Explain the difference between servlet and cgi?
How do you invoke a servelt?
Explain get and post.