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
Explain url encoding?
A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?
Why is init() method is used in servlets?
What do you mean by chaining in servlet?
What is a servlet-to-servlet communcation?
What is the workflow of a servlet?
What is the difference between the http servlet and generic servlet?
How do cookies work in servlets?
How to find whether a parameter exists in the request object?
What is the directory structure of web application?
What do you mean by cgi and what are its drawbacks?
What are the functions of the servlet container?
What is generic servlet class?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What is the difference between the include() and forward() methods?