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
When servlet object is created?
What are different Authentication options available in Servlets.
What are sessions in servlets?
How to get the actual path of servlet in server?
Why doesn’t a servlet include main()? How does it work?
What is the major difference between servlet and applet?
What is the use of java servlet api?
Explain servlet.
How would you create deadlock on your servlet?
What are life cycle methods of a servlet?
What is the procedure of invoking different servlet in a different application?
Why jsp is better than servlet?
What is dispatcher servlet?
What is the difference between the include() and forward() methods?
why we should override only no-agrs init() method.