Why does most servlets extend HttpServlet?

Answer Posted / dhiraj

All servlet classes extend the HttpServlet abstract class.
HttpServlet simplifies writing HTTP servlets by providing a
framework for handling the HTTP protocol. Because
HttpServlet is abstract, your servlet class must extend it
and override at least one of its methods. An abstract class
is a class that contains unimplemented methods and cannot be
instantiated itself.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the services in RMI ?

2113


When a thread blocks on i/o, what state does it enter?

852


Do we need to override service() method

1429


Do I have to use jsps with my application?

786


How to determine SGA site?

2195


What you mean by COM and DCOM?

864


To identify IDL language what mapping mechanism is used?

3684


Is jvm a overhead?

843


What are the different methods of identifying an object?

816


What must a class do to implement an interface?

814


Difference between swing and awt?

881


Explain ioc concept?

882


What is a tasks priority and how is it used in scheduling?

809


How are the elements of a borderlayout organized?

865


How would you detect a keypress in a jcombobox?

913