Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

escaping an iframe

 
John Kim
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a page on my website where there's a parent central view page (jsp) which contains within an iframe another jsp page. i set a timeout on tomcat so that after the user's been inactive for a certain period of time he will be led to the login page when he tries to access the webpage again. the problem is, if a user clicks on a link or a button located in the jsp page within the iframe, the login page pops up inside the iframe, instead of encompassing the whole web browser window. i'd like to rectify this matter so that the latter will occur, but i cant seem to find a way to do it. i would like to do it on the servlet side if possible, since thats where i check if the session is valid and lead the user to the login page if the session is determined to be invalid. any help would be appreciated. thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing you can do on the server side to change which window the response will be delivered to. It will be sent to the window that the request was submitted to,
What you'll need to do is to put client-side logic (in other words, Javascript) on the login page to detect whether it is loading into the top window or not, and to redirect to the top window when appropriate.
The HTML/Javascript would be a better forum for this topic.
hth,
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic