Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between JSESSION ID, cookie and session

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I don't know where to ask this J2ee Question. Sorry, because If I'm asking this question in wrong Place.

What is the difference between JSESSION ID and Session?
I red THIS blog, I got the explanation but I'm actually confused about JSESSION ID and Session..
In that blog, they told about JSESSION ID cookie. then

What is the difference between JSESSION ID and Cookie?

Please give me proper explanation.

Thanks:
Ramakrishna K.C
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm let see if I can explain this:

A (HTTP) session is an object that can hold conversational state across multiple requests for the same client. You can put "attributes" into this session. Each session has a unique "session ID" to determine who the client is.

Now how does the web container know what the session ID is? Through cookies.

A cookie is then an object that contains this unique session ID (apparently called JSESSIONID) and other stuff. This cookie is passed to the web container for it to identify who the client is.


Hope my explanation helps.

I'm sure Bear would have a better explanation.
 
reply
    Bookmark Topic Watch Topic
  • New Topic