aspose file tools
The moose likes Servlets and the fly likes session management using cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "session management using cookies" Watch "session management using cookies" New topic
Author

session management using cookies

Grishma Dube
Ranch Hand

Joined: Jul 01, 2003
Posts: 273
Hi All,

I came across to this question during one of the interviews.

How do we manage a session with cookies in servlet, if suppose we dont want to use a cookie class? is it possible?

TAI

Grishma
smitha verghese
Ranch Hand

Joined: Jun 21, 2003
Posts: 42
Hi there r diff ways to maintain sessions

1. hidden fields
2. url appending
3. Session objects
4. Cookies

smitha
Grishma Dube
Ranch Hand

Joined: Jul 01, 2003
Posts: 273
Thanks Smitha, but i know the ways of tracking a session.

Pls read my question carefully. I said, how do i manage a session using cookies but without making use of Cookie class?

Grishma
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12269
    
    1
Lets have a little more detail - what do you mean by "manage a session"??
I'm assuming you have read the HttpSession JavaDocs - what do you want to do that is not covered there? Have you read the JavaDocs for the various session listeners?
Bill


Java Resources at www.wbrogden.com
Rovas Kram
Ranch Hand

Joined: Aug 08, 2003
Posts: 135
Maybe the interviewer is looking for:

Use HttpServletRequest.getHeader(String) which can be used to get the cookies as a String instead of HttpServletRequest.get Cookies() whichs returns an array of Cookie class.
 
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: session management using cookies
 
Similar Threads
Are session attributes really stored in cookie?
Is cookies are mandatory for session management?
Cookies
Alternative to Cookie?
newbie : session problem