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
How to handle exceptions thrown by application with another servlet?
What exception should be thrown when servlet is not properly initialized?
Is that servlet is pure java object or not?
Which is the methods of generated servlet?
What's the difference between authentication and authorization?
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
What are the advantages of Servlet over CGI?
What is the difference in between the httpservlet and generic servlet?
Explain the differences between jsp and servlet.
List the Different types of servlet?
What do you mean by session tracking?
What is servlet lazy loading?
What is http servlet?
List out the difference between ServletConfig and ServletContext?
What is a cookie What is the difference between session and cookie