File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes difference between Generic servlet & Httpservlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

difference between Generic servlet & Httpservlet

laxmidhar prad
Ranch Hand

Joined: Feb 05, 2006
Posts: 33
what is the basic difference between Generic servlet & Httpservlet
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

GenericServlet exists to allow the handling of request using any protocol. Its abstract, so you implement how it handles whatever protocol you want it to support.

HttpServlet is an implementation of GenericServlet that handles HTTP.

Not a JDBC question. Please be more careful where you post things. Someone will move this shortly.
[ August 18, 2006: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
kancherla laxmi

Joined: Aug 18, 2006
Posts: 1
generic servlet process the request using service() method.
Httpservlet process the request using doGet() and doPost()method.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61967

Please take the time to choose the appropriate forum for your questions. This forum is for JDBC questions.

As this question is asked many times in the Servlets forum and is answered in the Servlets FAQ, I'm closing this topic.
[ August 18, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: difference between Generic servlet & Httpservlet