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
What are the basic exceptions in jdbc?
What is metadata in programming?
What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.
What is a jdbc connection string?
What are the ddl statements?
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
What are database warnings in jdbc and how can we handle database warnings in jdbc?
Which package contains jdbc api?
What is jdbc architecture in java?
Why do I have to reaccess the database for Array, Blob, and Clob data?
What should be done for auto generating primary key id in a table ?
State the three different ways in which you can create a table?
How many rowset are available in jdbc?
Is jdbc database independent?
List some new features available in jdbc 4.0?