File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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
It's not a secret anymore!