• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Break out of frameset

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a web page called "main.jsp" which contains 2 framesets. The top frameset point to "subtop.jsp" and the bottom frameset point to "subbottom.jsp". "subtop.jsp" contains textboxes and combobox to allow user to input their criteria in order to search for an item. "subbottom.jsp" will display the results after the search button is clicked. Whenever a user clicked on the combobox on "subtop.jsp", it will trigger to run a servlet.
I have also set a session timeout in "web.xml". When a session has timeout, I wish to display an error and get out of the frameset that contains "subtop.jsp" but I have no idea how I can do it? I have tried the http response.redirect in order to move to the main.jsp but I am still stuck in the top frame. Can anyone advise me? Thank you.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't do this from the server.
It needs to be done from the client.

Have you already figured out how to return a specific page if the user tries to access the system with a timed out session?
If so, simply return a page that uses Javascript to point the frameset to your login page.

window.parent.location = "my login page";
 
harry flower
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But where should I put "window.parent.location"? In "subtop.jsp"?
 
What are you doing in my house? Get 'em tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic