0

Hi,

I would like to know if it's possible to specify the "target='FrameName'" in response.sendRedirect("Home.jsp") by any chance?

I tried this:

<!-- Security Check -->
        <form action="Login" target="_top">
            <%
        if ((String) request.getSession(false).getAttribute("sessionStatus") == null) {
            response.sendRedirect("Login?pageTimeout=yes");
        }
            %>
        </form>
        <!-- Security Check -->

But it doesn't work... The target remains the same.

Thanks,
-Ashton.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by AshtonHogan
0

use a servlet to perform your check and then add a target attribute to the request object and forward it to the JSP

0

Hi,

I found an easy script to do this:

<script type="text/javascript">
            function breakout() {

            <%
            if ((String) request.getSession(false).getAttribute("sessionStatus") == null) {
            %>

                    if (window.top != window.self) {
                        window.top.location="Login"
                    }

            <%
            }
            %>
                    
            }
        </script>

Place that script in your <head></head> tags, then call it like this:

<body onload="javascript:breakout();">

Thanks,
-Ashton.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.