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 are the types of servlet?
Is tomcat a servlet container?
Is that servlet is pure java object or not?
Why the container loads server at the application startup and how?
How can we create deadlock situation in servlet?
If some new data has entered the database, explain how can a servlet refresh automatically?
How can we perform any action at the time of deploying the project?
How to get the IP address of client in servlet?
How can we refresh automatically when new data is entered into the database?
What is http servlet? Explain with the help of an example.
How can you push data from an Applet to a Servlet?
How do you find out what client machine is making a request to your servlet
Why HttpServlet class is declared abstract?
What is pure servlet?
What is servlet and its use?