Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / sekhar babu
yes, we can write constructor on our own but it should be
no argument public constructor only, cause container will
create the object so it needs no argument constructor.
Is This Answer Correct ? | 22 Yes | 1 No |
Post New Answer View All Answers
Is servlet a framework?
What is the major difference between context parameter and context attribute?
What is the use of httpservletresponsewrapper?
What is a cookie What is the difference between session and cookie
Differentiate between get and post?
What are the differences between the servletconfig interface and the servletcontext interface?
What do you mean by a filter and how does it work?
Why HttpServlet class is declared abstract?
Difference between GET and POST?
What is the difference between genericservlet and httpservlet
Why servlet is used as controller ? Not JSP? I want complete explation?
What are the uses of servlet
How can a servlet be used to generate plain text instead of html?
Explain servlet events?
How forward () method is different from send redirect () method?