• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Is this a session issue ?

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, glad to join this forum..

I have a JSP including a <iframe> in the middle of page. On top of page there are some links linking to different site. When click one link, the content is displayed in the <iframe> underneath the links.

<iframe src="...">

When I clicked one link that goes to a web app in a different server, I got the page displayed in the iframe. However, after that whatever link I click, I found I can not see the page because the variables and credentials saved in session are all gone and I got session error page. Note: when I click the link for the first time, I still got everything. But after that, whatever link on the page i click, I was directed to the login page showing no session found.

what could be wrong for that link ? why did it work everytime when I click it for the first time ? but fails afterwards immediately ?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to javaranch

You can use a session listener to find out if your session actually times out. Bind some keys to the listener and write some test code.
 
Linwood Hayes
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is not session timeout issue. I set session time out to 30 mins. I only waited for one second before I click the next one.
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not saying it is, but you can use that technique to rule out the possibility.

Another way you can check for session loss is to look at your server's active sessions page (if it provides you one).
 
Linwood Hayes
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a follow up, I found that

1) if I use "localhost" in the "src" link for iframe, it has the session lost problem
2) if I use my IP address in the "src" link for the iframe, the problem disappear.

Don't know why ?
 
It's exactly the same and completely different as this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic