Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session problem with IFRAME

 
siva kumarl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts,

I am facing a session problem with IFRAME , i have two applications , i have used the IFRAME to include the Application 2 in Application 1 , while posting the request from first application through IFRAME , each and every request posted is treating as a new request , due to this i am facing session maintainence problem , i have stored some data in session , but each and every request the session is coming as a new session , so i am unable to retrieve the session data . I have tried with cookies , for cookies also i am facing the same problem. I have searched in google, i didn't find any solution . Kindly suggest me friends how to handle this situation.

Thanks in Advance,
Siva kumar.
 
sourabh girdhar
Ranch Hand
Posts: 71
Java Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have posted the question in wrong forums.. Put it in web develpment forums , not in JDBC forums.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't share a session between applications. You either need to pass the data you need with the request or persist this data somewhere both applications can access, such as a database.
 
siva kumarl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sourabh,

Thanks for your reply, I am not sharing the session , i have included the application in IFRAME , it is just like a open application in seperate browser , the request coming from IFRAME is resetting every time means it is just like a new session or new request. So i need the synchronize the session/request.

Thanks in Advance,
Siva kumar.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Paul has already told you, the session cannot be shared between two different web applications regardless of whether you are using iframes or not.
 
siva kumarl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
But session sharing is working in some systems in IE browser. As per your statement it should not work in all the systems , i doesn't understand why it is happening so . Do you have any idea regarding this , and one more thing i am not sharing the session between the two applications . I am using the session of same application .

Thanks in Advance.
Siva Kumar.

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the source of your IFrame is the same application? I thought you said "two applications"? Which statement is correct?

 
siva kumarl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Source is different application. I think source is not a matter, whenever IFRAME point to application , session will intiate and if user gives the request on the rendered application again the session is intiating as new session . This is the exact problem.


Thanks in Advacne.
Siva kumar.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which session? The HTTP Session associated with the request to the application that includes the iframe will not change, regardless of what the source of the iframe is. The session associated with the request made from the iframe to the other application (defined as the source of the iframe) is completely unrelated to the first session.
 
siva kumarl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
I hope you understand almost my problem , yes exactly correct what you have mentioned , but the HTTP session associated with the request to the application that includes in the iframe is changing every time . I doesn't understand why it's happening so. And this is working for some systems and not for some systems.

Thanks in Advance,
Siva kumar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic