• Post Reply Bookmark Topic Watch Topic
  • New Topic

cookies and JSESSIONID  RSS feed

 
Ankur Jain Kothari
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the value of jsessionid can be found using httpsession.getID()..but how do i see this value from a cookie attached to the session?
 
Rohan kanade
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
get cookies from the request object and search for cookie named JSESSIONID
 
Ankur Jain Kothari
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and getValue() returns the value of the cookie....does it?
 
Rohan kanade
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, the Cookie.getValue() method returns the value of the cookie.

I suggest that you also keep a local version of the javadocs of servlet and jsp api with you, so that you can directly lookup what any method or class does.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!