Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?

Answer Posted / saikiran

that is one of the specification rule that
1.instantiated by constructior with no argument.
2.implementd class should be public and non-abstract.
3.should be implemnt javax.servlet.Servlet
We can Write it

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the type of protocols used in httpservlet?

616


List out the difference between ServletConfig and ServletContext?

609


What are the disadvantages of storing session state in cookies?

631


Why the container loads server at the application startup and how?

585


What is meant by a web application

543






What is the importance of init() method in Servlet ?

594


What is the purpose of inter-servlet communication?

595


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

648


Is tomcat a servlet container?

579


why we should override only no-agrs init() method.

680


What is servlet in web technology?

579


Explain servlet life cycle?

621


What are the functions of the servlet container?

1039


What do you mean by session tracking?

675


What is session tracking?

698