Is it possible to have a constructor inside the servlet?



Is it possible to have a constructor inside the servlet?..

Answer / Shiv Shankar

"No, servlets do not have constructors. Instead, they are initialized through the service provider or web server."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

can i call init() method in destroy() method of servlset. ?

5 Answers   IBM,


When a servlet accepts a call from a client, it receives two objects. What are they?

1 Answers  


What is meant by Servlet? What are the parameters of service method?

1 Answers  


What is Servlet API used for connecting database?

1 Answers  


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1 Answers  


Difference between jakarta tomcat and apache Tomcat?

4 Answers   IBM,


What do you mean by web applications?

1 Answers  


When Servlet is unloaded?

1 Answers  


What is a java servlet?

1 Answers  


How do we share data using 'getservletcontext ()?

1 Answers  


What are the mechanisms used by a servlet container for maintaining session information?

1 Answers  


What are the steps that are involved in using the httpservlet class?

1 Answers  


Categories