On Wed, 24 Jul 2002, Rick Fincher wrote:

> Date: Wed, 24 Jul 2002 18:37:19 -0400
> From: Rick Fincher <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Frame annoyance
>
> Hi,
>
> I have a webapp that uses Tomcat login security and html frames.  If a
> user's session times out, and the user tries to access the webapp Tomcat
> calls the login page as expected.
>
> The problem is that the old frame is still in the browser and the login page
> appears in whichever frame was last active, with all of the other frame junk
> still on the page.
>
> Is there a way to get Tomcat to call the login page with a target of _top so
> it clears the old frames out of the browser?
>

We ran into this exact issue with the admin webapp in Tomcat 4.1.x (which
also uses frames), and solved it by adding the following to the top of the
login page:

  <script language="JavaScript" type="text/javascript">
    <!--
      if (window.self != window.top) {
        window.open(".", "_top");
      }
    // -->
  </script>

This causes the login page to immediately redisplay itself if it gets
shown inside a frame.

> Thanks,
>
> Rick
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to