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
Why do I have to reaccess the database for Array, Blob, and Clob data?
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
How do I insert an image file (or other raw data) into a database?
Differentiate between a statement and a preparedstatement.
How the JDBC application works?
How can we move the cursor in a scrollable result set?
Why did my jdbc code throw a rollback sqlexception?
What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?
What does it mean to "materialize" data?
What are the functions of the jdbc connection interface?
What are the common tasks of JDBC?
List the advantages of using datasource?
Where is jdbc used?
What is layer in communication?
What is resultset in jdbc with example?