Answer Posted / sanjay sah
Yes, we can create constructor for servlet but that one
should be public no-args constructor.
If we do not create then compiler itself takes care for
it.Servlet container creates instance of servlet by invoking
public no-agrs constructor.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is setattribute in servlet?
How we can call a jsp from the servlet?
What is the use of servlet context?
What are the functions of the servlet container?
What is the functionality of actionservlet and requestprocessor?
What are the exceptions thrown by servlets? Why?
What is lazy loading and what is Generic Servlet Class?
What methodology can be followed to store more number of objects in a remote server?
What is the servletconfig object?
What are different ways for authentication of servlet?
Difference between httpservlet and generic servlets?
What is servlet collaboration?
What do you mean by a filter and how does it work?
Can we use threads in Servlets?
Is dispatcher servlet a singleton?