File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Session lost because iframe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Session lost because iframe" Watch "Session lost because iframe" New topic

Session lost because iframe

jingjinglili li

Joined: Mar 21, 2012
Posts: 2
There is a page, which has a div block for showing iframe inside the page. They are both in same domain, and written using Velocity Template.

When loading the page, the session is created and with some important session data. After the iframe loaded, the session id is changed to a different value, and the important session data are lost.

Do you know how to keep the same session without being changed by the iframe?

Thank you very much,


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

jingjinglili li wrote:They are both in same domain

But are they in the same web application? Sessions will not be shared across different web apps.

[Asking smart questions] [About Bear] [Books by Bear]
jingjinglili li

Joined: Mar 21, 2012
Posts: 2
Yes, they are same web application. The iframe is used for an image slider show which using a JQery. Why the the slider is put into a iframe because the JQuery version causes conflict to the existing JQery version used by the original page.

Is there a way to keep the session without rewriting by the iframe? or I have to discard the iframe idea, and solve the JQery conflict problem for the web site?

Many thanks,

I agree. Here's the link:
subject: Session lost because iframe
It's not a secret anymore!