*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on Session - HFSJ page 268 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question on Session - HFSJ page 268" Watch "Question on Session - HFSJ page 268" New topic
Author

Question on Session - HFSJ page 268

Padma priya Gururajan
Ranch Hand

Joined: Oct 05, 2006
Posts: 434
Hi,
I have a doubt on session in page 268 of HFSJ

Which interface define a getSession() method?
A. ServletRequest
B. ServletResponse
C. HttpServletRequest
D. HttpServletResponse.

The answer is 'C'. Can anybody tell how the answer is option 'C'.


With regards,
Padma priya N.G.


Padma priya N.G.
Be the change you want to be - Mahatma Gandhi
Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
HttpSession is specific to Http Protocol and hence we have the getSession method in HttpServletRequest. You can have a look here:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getSession()


Thanks and Regards
Padma priya Gururajan
Ranch Hand

Joined: Oct 05, 2006
Posts: 434
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Session - HFSJ page 268
 
Similar Threads
request.getSession
About the Session
JSTL - c:remove doubt
Response object in Filters
HttpSessionBindingListener vs HttpSessionAttributeListener [HFSJ]