Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getParameter() and other methods....

 
venkatesh rajmendram
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is a basic question....which is pondering in my mind. We have interfaces HttpServletRequest and HttpServletResponse...
When a servlet lets says extends HttpServlet and implements method
doPost( HttpServletRequest req, HttpServletResponse res) {
String whatever = req.getParameter("MyParm");
}
Where is actually getParameter() method implemented ??? is it in the container ?? can we see at its implementation ? is it some network specific ?
Any information in this regard will be helpful...
Thanks
Venkatesh
[ January 09, 2004: Message edited by: venkatesh rajmendram ]
 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as the name sugests, it is implemented in the HttpServletRequest .
 
venkatesh rajmendram
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
BTW the HttpServletRequest is an interface...There will not be implementation of getParameter() in interface....It should be implemented in some concrete or abstract class...
So still the question remains...
- Venkatesh
 
Jacky Chow
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by venkatesh rajmendram:
Hi,
This is a basic question....which is pondering in my mind. We have interfaces HttpServletRequest and HttpServletResponse...
When a servlet lets says extends HttpServlet and implements method
doPost( HttpServletRequest req, HttpServletResponse res) {
String whatever = req.getParameter("MyParm");
}
Where is actually getParameter() method implemented ??? is it in the container ?? can we see at its implementation ? is it some network specific ?
Any information in this regard will be helpful...
Thanks
Venkatesh
[ January 09, 2004: Message edited by: venkatesh rajmendram ]

Yes, the actual implementation of HttpServletRequest is provided by the Container!
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container with wrap the client request into a nice object(not sure of what class ) that implements the HttpServletRequest interface which is provided to our servlet's http methods.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic