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
Which application server is best for java?
What is preinitialization of a servlet?
Can you explain in detail 'javax.servlet' package?
Which method of the httpservletrequest object is used?
Describe the phases of servlet lifecycle?
What is getservletcontext?
What is api in servlet?
What do you mean by request dispatcher in servlet? Also explain its methods.
Explain the steps involved in placing a servlet within a package?
What is the difference between portlet and servlet?
What are the types of an http request?
Whether we can get deadlock situation in servlets?
What is Servlets and explain the advantages of Servlet life cycle?
What is the difference between using getSession(true) and getSession(false) methods?
What is servlet initializer?