This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler 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


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Doubt regarding HttpServetRequest request reference
 
It's not a secret anymore!