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 the difference between Difference between doGet() and doPost()?
What is the life-cycle of servlets?
What do you understand by mime type?
List some life cycle methods of a servlet.
Which is better jsp or servlet?
What is a deployment descriptor?
Which interface must be implemented by all servlets?
Can we fetch the attributes related to a servlet on a different servlet?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
What exactly is a servlet?
What is a servlet engine?
What is load-on-startup in servlet?
What does the term localization refer to?
What is the difference between servlet and filter?
Explain get and post.