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 common tasks of JDBC?
java based application for hospital management
Give a way to check that all result sets have bin accessed and update counts are generated by execute method.
What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.
What is ojdbc?
Can I get a null resultset?
What is the return type of class.forname() method?
What is a jdbc connection string?
What is the execute method in java?
Where can I find info, frameworks and example source for writing a JDBC driver?
What is the different between ResultSet and RowSet?
What is an advantage of using the jdbc connection pool?
How to make updates to updatable result sets in jdbc?
Does jpa use jdbc?
Why is jdbc used?