Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / n.l.narayana
yes., when ever the servlet is executed .,it requires
configuration.,the configuration should be done in init()
method only.,
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How can the referrer and the target urls be used in servlet?
what is servlet chaining?
What is the difference between 2 types of servlets?
What is the
What is servlet name in web xml?
How to create war file?
Whether thread can be used in servlets?
Explain jsessionid and when is it created?
How can we include static files in the jsp page?
What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?
What is a web container and what is its responsibility?
What is a servlet context object?
What is the difference between get and post methods?
Why do we need a constructor in a servlet if we use the init method?
Which httpsession object is used to view and manipulate information about a session?