Hi,
Actually the JSESSIONID is the same for any of the sub directories except the Mytmn pages (since its a different site). What I mean is the Jsessionid for the url tmn.pt/portal/site/tmn doesnt change if the Url is changed to tmn.pt/portal/site/loja or tmn.pt/portal/site/pontos and so on...
But the JSession only Changes when you type the ur www.tmn.pt. I am unable to figure out why this is happening.. From what I can see of the code, we have an index.jsp that redirects the user to different sites/folder but there is no Set Cookie commands..
What can I do the prevent the webserver from generating a new cookie instead of using the already created one ??
tx
Main Topics
Browse All Topics





by: mrcoffee365Posted on 2007-05-19 at 10:14:01ID: 19120863
First, be sure that the old JSESSIONID is gone, not just different. Mozilla, or Firefox with the WebDeveloper browser extension are best for looking at cookies. If you must use IE, then get the IE Developer Toolbar.
I looked at your site a little, and you are creating new JSESSIONID cookies at your subdirectories and subsites. You are also replacing the JSESSIONID when you return to the www.tmn.pt home page after going to www.mytmn.pt pages.
This probably means that you don't completely understand how sessions should be created, and you are creating a new one every time rather than using one if it is already there.
The Web servers don't do mysterious things (usually). You should search your code for any place where you manipulate the session, because it looks as if you are creating a new session for every return to www.tmn.pt.