Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • 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
  • 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 ??
 
Sharad Agarwal
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!