aspose file tools*
The moose likes Servlets and the fly likes creating object for ServletRequest Interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "creating object for ServletRequest Interface?" Watch "creating object for ServletRequest Interface?" New topic
Author

creating object for ServletRequest Interface?

naidu rasagna
Greenhorn

Joined: Apr 04, 2006
Posts: 15
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

Joined: Mar 30, 2006
Posts: 52
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

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

This is not your first warning regarding your display name.

Be aware that accounts with invalid names are closed.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating object for ServletRequest Interface?