Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this a session issue ?

 
Linwood Hayes
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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 ?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • 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
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • 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
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic