This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

usage of generic servlet -- still not clear  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, I went through the existing archives to understand where do we use generic servlet ? I did not find clear answer.
I know that it is a base class for httpservelt.
In one of the postings, i read that it is used to create protocol independent servlet. What does it mean?
I would highly appreciate if anyone can answer my question with clear answer.
thanks.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I advise you to read some about J2EE. And you will understant where the GenericServlet will be used other then a parent class for HttpServlet.
 
deepa karkala
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been working in J2EE projects. But i never came across writing generic servlets. That's why i am asking this question.
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jyoti,
When the container receives a request it directs the request to the sevice( servletrequest, servletresponse) method which inturn calls its service( HttpServletRequest, HttpServletResonse) method. This method analyzes the request and passes it to apporiate doGet/doPost etc method.
I hope the utility of the generic service method is clear now.
Cheers!
 
deepa karkala
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bobby, thanks for your cheerful reply. But what i am saying is, I have been using httpservlets to handle http requests. Ofcourse, it has all these doGet(), doPost() methods. I know that it is not advised to override the service method in case of httpservlet.
Do u mean this itself is the usage of generic servlet ? Does it mean that the generic servlet handles the http requests ?
I would highly appreciate if u can clear my confusion.
 
deepa karkala
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bobby, someone asked me whether generic servlets handle http requests ? Where do we use generic servlets ?
I am in the impression that generic servlets can not handle http requests. We have to use http servlets to handle http requests.
Secondly, where do we use generic servlets ? Do we use it for ftp service or something similar ?
I am curious to find out the answers for this.
 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think it's utility for any servlet and help about log or somethink like init() for any servlet
Fix me...
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!