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

Answer Posted / abc

you can write as like for regular class.

Is This Answer Correct ?    10 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you refresh servlet in client and server-side automatically?

630


What is the difference between Difference between doGet() and doPost()?

765


What do you mean by request dispatcher in servlet? Also explain its methods.

622


How the servlet is loaded?

610


What are its drawbacks of cgi?

578






What is difference between GenericServlet and HttpServlet?

577


How to get the server information in a servlet?

697


What exactly is a servlet?

555


How many servlet objects are created?

576


What is the difference between sendredirect() and forward() in a servlet?

537


How do you deal property files in servlet?

614


Why don't we write a constructor in a servlet?

602


What is the difference between portlet and servlet?

523


Which HTTP method is non-idempotent?

631


Why are servlets used?

543