Hi!
I'm not absolutely sure I'm understanding what you want to do correctly, so here's what I think you want:
You have a JSP page with two frames and you want to replace the whole page (not just the second frame) with some other page. Right?
If so, in what case do you want to do that? If it's when clicking a link or button, that's pretty simple HTML and/or JavaScript. If you want to do it automatically when the page is loaded, likewise. If it's anything else, you may have to use something more complex, but you'd have to describe the situation.
The other way to interpret what you said is that you want to open a new window with a different page and then close the old window after the new one was opened. There may be situations in which you would want to do that, although I can't think of any right now. If that's the case, it will be a bit more complicated. (I certainly don't know how to do that, but then I know little about JSP.)
Greetings,
Nepomuk