Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Cookies

 
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