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 to create war file?
Is servlet a server side scripting language?
Why do we need a constructor in a servlet if we use the init method?
What do you mean by mime type?
What is the servletconfig object?
What are the ways to handle multi-threading in servlets?
What does the term localization refer to?
What is httpservlet and how it is different from genericservlet?
Why do we need servlet filter?
Why do we use sendredirect() method?
What is meant by a servlet?
What are the life cycle methods of the servlet?
What do you mean by web applications? Explain web application directory arrangement?
Which http method is said to be non-idempotent and idempotent?
Which java framework is most popular?