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 are sessions in servlets?
What are the advantages of Servlet over CGI?
What is servlet configuration?
What is servlet and its life cycle?
When Servlet is unloaded?
What is servlet and its advantages?
Is servlet a server side scripting language?
Can we fetch the attributes related to a servlet on a different servlet?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
What is the advantage of Servlets when compared with other server side technologies?
Explain servlet events?
Explain the lifecycle of a servlet?
What are the types of Session Tracking ?
What are session variable in servlets?
How do you configure a centralized error handler in servlets?