Can we define constructor in Servlet class?
Answer Posted / naveen
yes we can create a constructor
by default JVM calls default constructor.In addition to that if write both default and parameterized constructor then JVM call default one and then parameterized one
hence the ans is yes we hav to write two constuctors
no if write our own constructor one itself
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What are the key methods that are involved in processing of http servlets?
Why do we need a constructor in a servlet if we use the init method?
Why do we have servlet listeners?
How do you design microservices?
How can the referrer and the target urls be used in servlet?
What is cgi?
What is Request Dispatcher?
What is the difference between a generic servlet and http servlet?
Explain how to improve Servlet Performance?
What are the steps that are required to handle the multi-threading?
Tell us something about servletconfig interface.
How can you use a servlet to generate a plain text instead of html?
What is the use of servlet context?
What is Servlet API used for connecting database?
How do you communicate in between Applets and Servlets?