Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

when we use Generic servlet in the Program & when we use Http Servlet in our program?  RSS feed

 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we use Generic Servlet in the Program & when we use Http Servlet in our program?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd most likely will never use GenericServlet. That's a leftover from the early days of servlets when it was imagined that there might be other protocols besides HTTP you might want to use in a servlet. No such implementations ever came to life (besides SIP recently). See http://www.coderanch.com/how-to/java/ServletsFaq#otherProtocols for some more information.
 
Shivom Shukla
Ranch Hand
Posts: 77
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah i agree with Ulf Dittmer... HttpServlet is more advanced than GenericServlet... it is protocol dependent and uses doGet() and doPost() unlike its predecessor... besides, GenericServlet is no longer in use...as coding as evolved...so have the programmers and they have switched to HttpServlet long time back...
 
BalaMurali dhar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all your comments.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shivom Shukla wrote:as coding as evolved...so have the programmers and they have switched to HttpServlet long time back...

There was no "switch". HttpServlet has always been the class that was extended.
 
Shivom Shukla
Ranch Hand
Posts: 77
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was no "switch". HttpServlet has always been the class that was extended.


Yes it is true what you say Bear Bibeault ...i meant that we use HttpServlet as this has more implementations...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!