This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Doubt regarding HttpServetRequest request reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Doubt regarding HttpServetRequest request reference" Watch "Doubt regarding HttpServetRequest request reference" New topic
Author

Doubt regarding HttpServetRequest request reference

Hariom Tiwari
Greenhorn

Joined: Jun 15, 2008
Posts: 10
Hi All,
In doPost/doGet method we call all methods on request/response, while they are references only and the methods being called are also abstract.
My understanding says methods can be called only on objects.
Please tell me the mechanism behind this behavior.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

HttpServletRequest is an interface. Something else implements it. In the case of servlets, it is the container that does this.

This is a fundamental concept in Java, you'll see it in all sorts of code. I'd recommend a read through of the Java Tutorial.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
GeeCON Prague 2014
 
subject: Doubt regarding HttpServetRequest request reference