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 is the difference between executing, executequery, executeupdate in jdbc?
What is represented by the connection object?
Explain the life cycle of jdbc.
Why do you use a data source object for a connection?
Which is best database for java?
What are the steps to connect to the database in java?
How to check jdbc connection in linux?
What is a jdbctemplate?
Why is jdbc used?
How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?
What are different types of ResultSet?
Explain the main method?
What class.forname will do while loading drivers of jdbc?
What is a statement in java?
What are the jdbc statements?