Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?
Answer Posted / narayana rao dasari
yes.....! we can write constructor for servlet class why
because every java class allows construction initialization
if we do not write constructor explicitly it will call
default constructior.
If we call our own constructiors means we will not able to
access the servelet config objects so better wat is to
intializeing in init() method......thank u,
Narayan
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a servlet engine?
What are the two important api's in for servlets?
What’s the use of the servlet wrapper classes??
Can you create a deadlock condition on a servlet?
What are the types of protocols supported by httpservlet ?
Name the different ways of session tracking.
How do we call one servlet from another servlet?
What are the jobs performed by servlets?
What do you mean by httpservlet?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What is the difference between a generic servlet and http servlet?
What are the kinds of http requests?
Why the concept of single thread model interface is used?
How do I use cookies to store session state on the client?
Explain the working of service() method of a servlet.