title: Redirect parent page from a ifram in JSP by JAVA
body: <p>A same question can be found <a href="https://stackoverflow.com/questions/580669/redirect-parent-window-from-an-iframe-action-using-javascript">here</a> .  and some equal questions found.<br>
    They are about <code>javascript</code> (answer :-window.top.location.href = "<a href="http://www.site.com" rel="nofollow noreferrer">http://www.site.com</a>"; )<br>
   <strong>But</strong><br>
  I want to know how to redirect it by <code>Java</code> in a jsp page. A usual redirect can be done as..  </p>
  
  <pre><code>response.sendRedirect("newUrl.jsp");  
  </code></pre>
  
  <p>But it redirects the source page inside the iframe not the parent page. The task is that the source file of the iframe get refreshed and do some stuff(checking session.. getting attributes.  )and if the source page meets a particular logical stage,then the parent page might be redirected to another page.But not in javascript, I want to know it in JAVA( That means the jsp/servlet container decides and redirects to another page in the server).<br>
  My current opinion is that, such things might be handle with javascript.Your all info is highly appreciated. </p>