• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Break out of frameset

 
harry flower
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
But where should I put "window.parent.location"? In "subtop.jsp"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic