Answer Posted / chandra kunchala
yes ofcourse we should.
it is mandatory for servlet.
for servlets we required publc no argument constructor. if v
don't having that one, our servlet should not work, even
though if you are not crating the public no-argument
constructor, the java compiler will take the responsibility
to create public no- argument constructor.. mean while your
servlet should be public otherwise you will get
RuntimeException.
we can create costructor for sevelet but it should b no-
argument constructor. and u r servlet should be public.
and one more thing this constructor in not in the place of
init() method..
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Which event is fired at the time of project deployment and undeployment?
Which is better jsp or servlet?
What are the uses of servlets?
Explain url encoding?
What is the directory structure of a war file?
Explain the difference between jsp and servlet?
Define the servlet mapping.
Why doesn’t a servlet include main()?
What is the use of java servlet api?
Explain the features are in servlet 3?
Why servlet is faster than jsp?
What's the use of servletcontext?
What is a cookie What is the difference between session and cookie
How do you find out what client machine is making a request to your servlet
What is servlet used for?