Difference between Generic Servlet and HTTP Servlet?

Answer Posted / sonia

GenericServlet belongs to javax.servlet package
GenericServlet is an abstract class which extends Object and
implements Servlet, ServletConfig and java.io.Serializable
interfaces.
The direct subclass to GenericServlet is HttpServlet.It is a
protocol-independent servlet.
To write a GenericServlet you need abstract service() to be
overridden.


HttpServlet:
HttpServlet belongs to javax.servlet.http package
This is an abstract class which extends GenericServlet and
implements java.io.Serializable
A subclass of HttpServlet must override at least one method
of doGet(), doPost(),doPut(), doDelete(), init(), destroy(),
getServletInfo()

Is This Answer Correct ?    22 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is jdbc part of j2ee?

775


What do you understand by jdbc datasource?

809


Which is better odbc or jdbc?

690


What is sqlwarning?

793


Why do we use jdbc?

725


What is jdbc odbc bridge?

723


What does the connection object represents?

791


What is the use of dialect?

776


How MS-Access DB can be accessed over a network, using JDBC API?

2223


Explain the life cycle of jdbc.

843


How to know howmuch data is truncated?

2142


What is the function of drivermanager class?

847


What is jdbc and its advantages?

742


What is odbc and jdbc?

691


What is transaction processing in jdbc?

791