This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Session lost because iframe" Watch "Session lost because iframe" New topic
Author

Session lost because iframe

jingjinglili li
Greenhorn

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,

Jing

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

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] [Bear's FrontMan] [About Bear] [Books by Bear]
jingjinglili li
Greenhorn

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,

Jing
 
 
subject: Session lost because iframe
 
Similar Threads
Ajax
Has anyone used Iframes to load multiple JSPs and servlets?
Problem in Selecting values from select tag
Retrieving from iframe?
One JSP to another and then back