File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Session - HFSJ page 268

 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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()
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic