Multiple domains and sessions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple domains and sessions

cybercxf
Hi,

I have configured my windows box such that 127.0.0.1 is mapped to localhost, localhost.com, localhost.org

Now, in my application, I use HttpSession object  to maintain session across JSP pages.

Whenever I access the website

http://localhost.com:8080/

It opens the index.jsp page just fine.

Then I login and set the session attributes in the session object and go the home page say home.jsp. This works fine too.

http://localhost.com:8080/home.jsp

However, sometime later when i submit a form, which points to another page, searchresults.jsp

the ServerName changes to:

localhost

only and as a result my session is invalidated and I am sent back to the index page.

Can anyone tell me why is this happening?

thanks