Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Session problem with IFRAME

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 81
Spring Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have posted the question in wrong forums.. Put it in web develpment forums , not in JDBC forums.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67592
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic