• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error page, target="_top", how??  RSS feed

 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing JSP within a frameset. If one of the frames has an error, I want it to call an error page which takes over the whole browser. Normally this is done with target="_top".
I see how to specify the error page URL

but no corresponding attribute for "target". How to do this? Do I have to code it into a servlet instead?
Thanks
Geoffrey
[ June 02, 2002: Message edited by: Geoffrey Falk ]
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geoffrey
Try to specify the error page with a query at the end: 'target="top"'. I've not tried it personally but it should work. If not then try running this script when your error page is loaded:

hope that helps
[ June 03, 2002: Message edited by: Dave Vick ]
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion. I have used similar things on a static website, to ensure that nobody can trap my pages in their frames. Unfortunately it relies on the browser having JavaScript enabled.
There must be some way to send the "target" directive in the HTTP response. I am going to research more and see how this works.
I must admit, I am new to servlet/JSP. I am still trying to understand the flow of control, how to manage sessions and beans, etc. I got a book on Struts, but I think MVC too much to absorb at first.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave, I was going to make a similar suggestion and then realized that doing JavaScript in this way is the equivalent of a redirect, and hence the exception object on the request will be lost. Drat.
I've never heard of the 'target=top' mechanism on the query string of the error page. Is this part of the spec? If so, it certainly has a better change of retaining the exeception information on the page.
bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!