This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt regarding HttpServetRequest request reference
 
Similar Threads
Servlet init
init
Action class constructor - is it called every time ,,,,,,
Thread Safe access
Servlet's constructor