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 webservlet?
What is servlet and its advantages?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What is the servlet?
How to make sure a servlet is loaded at the application startup?
How httpservlet is different from the genericservlet?
Why do you use session tracking in httpservlet?
How to find whether a parameter exists in the request object?
Which protocol will be used by browser and servlet to communicate
What is the difference between encodeRedirectUrl and encodeURL?
how the HTML data stored in web server?
Why is init() method is used in servlets?
What is the use of servlet wrapper classes?
How do we go with database connection and log4j integration in servlet?
What is servlet configuration?