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 / manas banerjee
you can use but should not.the original reason for init()
was that ancient version of java could not dynamically
invoke constructors with arguments.so there was no way to
give the constructors a ServletConfig.So u would not have
to access to ServletConfig or ServletContext.
{{in short:init() has access to servletconfig and
servletcontext object constructor would not..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is called a session?
What is a servlet context object?
How do you define a servlet?
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
What are the supporting protocol by HttpServlet ?
What do you mean by session tracking?
Difference between java beans & servlets?
What is difference between cookies and httpsession?
What is servlet in simple terms?
What are the ways to handle multi-threading in servlets?
What is ServletContext object?
What is getservletcontext?
What is called servlet mapping?
Explain the working of service() method of a servlet.
What are the different methods involved in the process of session management in servlets?