• 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

whilst fooling around with SessionId and cookies...

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I often use a little java program to (re)familiarize myself with header and session data. Whilst playing around I noticed that when I hit a page for the first time with

it retrieves and displays the session ID whereas the following methods return nulls the first time around

Only on refreshing or "hitting the page again" do they get "synchronized", of that's the right word.
(Q1) Are these the same thing: sessionId, JESSSIONID, cookies ? They display the same values.
(Q2) What is the method "request.getSession(true)" used for ? The arbitrarily assigned hex-value surely cannot identify the session uniquely ?
Here is the code, you need only modify the package, starting from your docbase.


One day, I too will be a java programmer, just not today!
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to Servlets.
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic