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

Where we can write Rmi registry in the code, without having to write it at the command prompt?

2531


Explain what is orm?

873


Explain RMI Architecture?

837


What is abstract schema?

780


What is the difference between static and non-static with examples?

1613


What is the difference between ear, jar and war file?

820


What are the benefits of detached objects?

817


Do you think that java should have had pointers?

825


which type of objects reference will be given to client?

2272


what is meant by JRMP?

2025


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1911


What is mdb and what is the special feature of that?

814


How messaging services are done, before release of JMS?

1827


How many times may an objects finalize() method be invoked by the garbage collector?

876


When is the best time to validate input?

833