• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when we use Generic Servlet in the Program & when we use Http Servlet in our program?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://coderanch.com/how-to/java/ServletsFaq#otherProtocols for some more information.
 
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all your comments.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic