Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / ravi
No..not at all,,,,servlet is a class which is dynamically
loaded...dynamically loaded class never requires
constructors.
| Is This Answer Correct ? | 8 Yes | 18 No |
Post New Answer View All Answers
What is SingleThreadModel interface?
Why is httpservlet declared abstract?
What are the common methods that are included in the http servlet class?
Explain the difference between generic servlet and http servlet?
What is Request Dispatcher?
What is the purpose of inter-servlet communication?
What are the differences between servlet context vs servlet config?
What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?
How we can create war file in servlet?
What is Servlets and explain the advantages of Servlet life cycle?
What is the
Given the request path below, which are context path, servlet path and path info?
How can the referrer and the target urls be used in servlet?
How to rectify errors in java servlet while compilation?
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?