I am creating a session id
HttpSession session = request.getSession(true);
in login servlet and calling welcome page from there…printing session values in both the pages
<% System.out.println(session.getID()); %>. Though these session values comes same on my local machine and local tomcat server, when I run it on remote tomcat server I am getting two different session values. Is there any configuration setting in Tomcat which might affect this. I am using java1.6, Tomcat6.0.25, xml2.4.
Can anyone help me with this weird issue.
I recently noticed that set-cookie PATH is set to “/website-name” while I saw that several online documents say “Path=/”. Can this be a problem and where/how to change this path to see its effects?
[SOLVED]
It might not be something considered good programming trick, but this problem required changing the sessioncookiepath value at web-app>METAINF>context.xml file. For particularly my problem, putting following code helped: Context sessionCookiePath=”” This might be due to my website structure.