This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Cookies  RSS feed

 
Nagamalini Pampati
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the result of calling getMaxAge() on "jsessionid" cookie? and is it "jsessionid" or "JSESSIONID"?

Thanks in advance,
Malini
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Logically, I would say that it returns -1, meaning that it will persist until browser shutdown.

"JSESSIONID" is the name of the cookie.
"jsessionid" is the name of the request parameter passed when using url rewriting.
 
Nagamalini Pampati
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the result of calling getMaxAge() on "jsessionid" cookie? and is it "jsessionid" or "JSESSIONID"?

Thanks in advance,
Malini


JSESSIONID ( in capitals ) is the name for cookie for session management
"jsession" is the URL element that names the uniquie session ID when URL rewriting is used for session management

So , in the respose you have

and in the request you get


XXXXXXXXXXXXXXX is the session id
Hope it helps
 
Nagamalini Pampati
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Niranjan.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!