Get your CodeRanch badge!*
The moose likes JSP and the fly likes PageContext Object Returning a ServletRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "PageContext Object Returning a ServletRequest" Watch "PageContext Object Returning a ServletRequest" New topic

PageContext Object Returning a ServletRequest

Nicolas Brasseur
Ranch Hand

Joined: Nov 09, 2001
Posts: 45
Can a G�R� answer my question ...
Why the getRequest() method of a PageContext Object is returning a ServletResponse reference (actually a reference pointing to an object that implements the ServletResponse interface) instead of returning a reference to an object implementing the HttpServletResponse interface ?

<a href="" target="_blank" rel="nofollow">BlackBeltFactory Communtiy</a> founder - Building better developers<br /><b>Free</b> courses and mock exams
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
This allows for Support of a system using something other than HTTP. The entire servlet package is founded on the fact that other implementations may be developed to support other protocals. I haven't seen a good working example of any.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: PageContext Object Returning a ServletRequest
Similar Threads
what are map objects
which ofenclosing page variables can be automatically used by the dyna.included file?
EL expressions
How to get ServletConfig or ServeltContext object in the Simple Tag handler?
Wrapper class of ServletResponse