Can we define constructor in Servlet class?

Answer Posted / jayakrishna

init() is there what is the need of constructor.If is ther
who will call the constructor? servlet container will call
the init method

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If some new data has entered the database, explain how can a servlet refresh automatically?

983


What are the phases of the servlet life cycle?

795


Tell us something about servletconfig interface.

761


Should I override the service() method?

857


What is a servlet-to-servlet communcation?

853


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

837


Write a simple servlet program to print the contents of html.

774


What is servlet container?

867


Servlet is pure java object or not?

917


What's the servlet interface?

818


What is the difference between genericservlet and httpservlet

763


What is the difference between Servlets and Applets?

749


Explain the methods of request dispatcher in servlet?

718


Write a program to show the functionality of servlets.

740


What are the life cycle methods of a servlet?

773