• Post Reply Bookmark Topic Watch Topic
  • New Topic

session tracking  RSS feed

 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. I have a question about session.
I have this servlet:


When I click on the URLSecond link this servlet is opened:


I have set up the higher level of privacy in my IE (no coockies at all). But when the URLSecond opened it printed the sessionid not null, but the long string of HttpSession id.
Does somebody can explain me why the sessionid is not null when the cookies is disabled?

Thanks in advance.

[ March 13, 2005: Message edited by: Serghei Jelauc ]
[ March 13, 2005: Message edited by: Serghei Jelauc ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because there are more ways than just cookies to propagate session IDs and the browser and server are smart enough to pick the correct one on their own.
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen Wenting:
Because there are more ways than just cookies to propagate session IDs and the browser and server are smart enough to pick the correct one on their own.



May be that's true but in servlet URLSecond, variable sessionid is constructed in for loop, which depends on cookies array, so ideally this loop must not entertain any iteration as req.getCookies must return null.


-Praful
[ March 14, 2005: Message edited by: Praful Thakare ]
 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Thank you guys, But I still need explanation.
So, why does cookies array contains cookie with the name "JSESSIONID" if i have disabled cookies in my IE browser?

Thanks in advance.
 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I fogot to say that I use WebLogic 8.1 server.
May be it will help you to answer to my questions.
 
Serghei Jelauc
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I have found the reason.
I've tryed the same servlets on Mozilla FireFox with cookies disabled and it works perfect. I have the NullPointerException when I try to iterate through the cookies array and get cookies.length.
But in IE I do not have that Exception. I think it means that this is the BUG if IE.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!