A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Web Component Certification (SCWCD/OCPJWCD)
Author
Question on Session - HFSJ page 268
Padma priya Gururajan
Ranch Hand
Joined: Oct 05, 2006
Posts: 411
posted
Jul 20, 2007 04:51:00
0
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
posted
Jul 20, 2007 05:40:00
0
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
posted
Jul 20, 2007 05:47:00
0
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]
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter