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
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply 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: 411
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: 411
Thanks.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question on Session - HFSJ page 268
 
Similar Threads
Response object in Filters
About the Session
JSTL - c:remove doubt
request.getSession
HttpSessionBindingListener vs HttpSessionAttributeListener [HFSJ]