Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / abhishek taneja
yes offcourse you can write a constructor for a servlet
after all it is a java class. you can simply provide but if
u do not provide then it is by default include the no
argument constructor that is used by the Init() method in
the servlet life cycle.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
How do you find out what client machine is making a request to your servlet
What do you mean by filter in servlet?
Which interface should be implemented by all servlets?
What is meant by Servlet? What are the parameters of service method?
How we can call a jsp from the servlet?
Are Servlets Thread Safe? How to achieve thread safety in servlets?
What's the servlet interface?
What do you mean by session tracking?
Can you explain in detail 'javax.servlet' package?
how many jsp scripting elements are there and what are those?
What is servlet and its use?
Is java servlet still used?
What are session variable in servlets?
What’s the difference between genericservlet and httpservlet?
What are the different ways we can maintain state between requests?