• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

escaping an iframe

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic