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 we use jdbc instead of odbc?
Where can I find ojdbc14 jar file?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database?
How can you retrieve data from the resultset using jdbc?
What are different types of ResultSet?
Expalin the method of calling a stored procedure from jdbc.
How to check jdbc connection in java?
What are the considerations for deciding on transaction boundaries?
How do I set properties for a JDBC driver and where are the properties stored?
What is isolation level? How to set it?
Explain the locking system in jdbc?
What are common JDBC Exceptions?
password, is stored in as plain text. What can I do to protect my passwords?
what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();