wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Regarding Cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Regarding Cookies" Watch "Regarding Cookies" New topic
Author

Regarding Cookies

Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
what is the result of calling getMaxAge() on "jsessionid" cookie? and is it "jsessionid" or "JSESSIONID"?

Thanks in advance,
Malini
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
Thank you.
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
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


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
Thanks Niranjan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding Cookies