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

What is a jdbc connection string?

659


How to test jdbc connection to sql server?

719


Explain the locking system in jdbc?

727


What is in terms of jdbc a datasource?

778


What is the JDBC?

755


How to connect multiple database in jdbc?

735


Which constraint cannot be specified as an explicit constraint and should be specified with the column only ?

679


What is JDBC RowSet? What are different types of RowSet?

795


What is JDBC Connection isolation levels?

769


Give a way to check that all result sets have bin accessed and update counts are generated by execute method.

694


There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?

841


How do I start debugging problems related to the JDBC API?

746


What is jdbc thin client in oracle?

675


Explain about multiple implementations and drive manager?

804


What does jdbc do?

716