• Post Reply Bookmark Topic Watch Topic
  • New Topic

Examples of HttpServlet & GeneriServlet

 
chaitanya krishna
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
pls tell me examples of HttpServlets & GenericServlets.
When these are used... ie what situvation....

Regards
krishna
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpServlets are used when you need a technology which can understand HTTP requests.

GenericServlet is not directly used, since it is abstract. You would extend it to provide a servlet implementation for a specific protocol.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally a servlet is created by subclassing a GenericServlet or HttpServlet.
Whenever there is a need to implement communication protocol independent servlets, GenericServlet will be useful.
HTTPServlet as name indicates uses http protocol.

Both GenericServlet and HTTPServlet are abstract classes. The servlet extending them has to provide the implementation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!