• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Sometimes "jsessionid=xxx" appears and sometimes it doesn't a bug ?

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Orginally I thought it was a struts problem, but now I think it is a general servlet question ---

I use "struts" framework which automatically handles the "encodeURL" for me. I have checked my browser by using "isREquestedSessionIDFromCookie()" method and it returns TRUE so my browser is supporting cookies. Now the confusing part is -- Sometimes I don't see any "jsessionid=xxxx" but sometimes I see "jsessionid=..." on the URL, it looks like quite arbitrary, sometimes on this page I see it, but not on next page, and vice versa, the application works fine though. I am wondering if anybody knows the reason for this. Is this a bug coming from my application ? But I really don't do any session tracking here as struts handles that for me. why does this happen ?
 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The interesting thing is even after I block the cookies on my browser, when I get to the beginning JSP page, first I saw "jsessionid=.." when clikc "submit" to go to the next page, but when I click "back" to the first page, and then click "refresh" button, then click the submit, this time the "jsessionid=..." disappeared. why ? AM I supposed to see it because I have blocked the cookies ??
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only links which have been encoded using the encodeURL() API will, when clicked, show jsessionid in the address bar (I am assuming that cookies are disabled/unavailable). I am not aware, though, how Struts handles this under the covers or how it picks and chooses to encode the URL.
 
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic