aspose file tools*
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
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: 437
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: 437
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Session - HFSJ page 268