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 servlet and its advantages?
What are sessions in servlets?
What do you mean by httpservlet and how it is different from the genericservlet?
What is the web server used for running the Servlets?
What's the difference between authentication and authorization?
How can we invoke another servlet in a different application?
How servlet is created?
How do we translate jsp?
What methodology can be followed to store more number of objects in a remote server?
What are the life-cycle methods for a servlet?
Is it good idea to create servlet constructor?
What are the advantages of servlets over traditional cgi?
What are the common methods that are included in the http servlet class?
Explain get and post.
Define servlet mapping?