DebugBar Forums
 
 HOME 
 DOWNLOAD 
 BUY 
 DOC / WIKI 
 FORUM 
 CONTACT 
Stay tuned : rss feed

Forum Home


advanced search

You are not logged in.

Announcement

Forums are now closed as we moved them to google groups. You can use the following Google Groups to discuss about DebugBar and IETester products:

#1 2008-10-14 15:14:13

frafu
New member

Redirect in frames

Hi!

I have noticed a strange behaviour after i installed companion.js.
Simple test scenario with a tomcat JSP server.

Main.jsp:

Code:

<html>
<head>
    <title>Test</title>
</head>
<frameset rows="200,*">
    <frame name="f1" src="Test.jsp">
    <frame name="f1" src="Test.jsp?redirect=true">
</frameset>
</html>

Test.jsp:

Code:

<%
    if(request.getParameter("redirect")!=null) {
        response.sendRedirect("Test.jsp");
    }
%>
<html>
<head>
    <script type="text/javascript">
        window["undefined"]=window["undefined"];
    </script>
</head>
<body onload='document.getElementById("a").innerHTML=window["undefined"];'>
<div id='a'></div>
</body>
</html>

As you can see, the Main.jsp has a frame construct with two frames. The first frame is called directly with "Test.jsp". The javascript in this frame works fine.
The second frame calls "Test.jsp?redirect=true". In Test.jsp is now sent a redirect to Test.jsp without parameter. This is done with a response Code  307 Temporary Redirect. The browser now gets Test.jsp without any parameter and the site will be delivered.
But in this case I get the JS error: "Permission denied" for the window object.

In the end, both frames get exactly the same html code but with the difference of the former redirect.

When i uninstall companion.js everything works fine.

best regards
  frafu

Offline