• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why dont we use GenericServlet

 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GenericServlet is an abstract class it can handle all types of protocols,but HttpServlet handle only Http specific protocols

then Why dont we use GenericServlet
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GenericServlet is a Abstract class. You need to implement all the unimplemented methods.

For Http protocols, these methods are implemented by the HttpServlet class and we simply extend it and use it in our servlet.

but nothing stops us from using GenericServlet abstract class. Infact we need to use GenericServletif we are going to use any protocol other than HTTP.
 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ashwin Sridhar, Ulf Dittmer


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic