Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / ravikiran
we cann't write a constructor because the servlet container
will create the instance of the servlet by calling the
no-arg constructor
Is This Answer Correct ? | 1 Yes | 8 No |
Post New Answer View All Answers
What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?
What is war file?
What are the servlet events?
What is the purpose of dispatcherservlet properties?
What is the procedure of invoking different servlet in a different application?
What is URL Encoding?
How can a servlet be used to generate plain text instead of html?
What do you mean by cgi?
What are the types of protocols supported by httpservlet ?
What is servlet in simple terms?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
Explain jsessionid and when is it created?
Name the different ways of session tracking.
What is the workflow of a servlet?
What is servlet lazy loading?