Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating object for ServletRequest Interface?

 
naidu rasagna
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As the HttpServletRequest is an interface and we are creating the object for that interface in the service method.
How is this possible???
Is that the declaration then where that is defined???
Thanks
[ May 03, 2006: Message edited by: Bear Bibeault ]
 
Jass Singh
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by j@smin j@smin:
Hi,
As the HttpServletRequest is an interface and we are creating the object for that interface in the service method.
How is this possible???
Is that the declaration then where that is defined???
Thanks


Yes HttpServletRequest, HttpServletResponse, HttpSession etc are interfaces. Their implementation is provided by the respective Servlet containers e.g. Tomcat, WebLogic etc.

Regards,
Jass
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
j@smin j@smin:
Welcome to JavaRanch!

We're pleased to have you here with us in the Servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here

Thank you.
-Ben
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not your first warning regarding your display name.

Be aware that accounts with invalid names are closed.

bear
JavaRanch Sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic