怎样实现在servlet中重定向一个jsp页面到一个指定的frame框架
使用 response.sendRedirect("jspName.jsp")
像用<a href="jspName.jsp" target="mainframe" ></a>超链接一样,
能实现吗?或者还有其他方法来实现(至谢!!!!!)

解决方案 »

  1.   

    用映射,jspName.do
    在web.xml中配置映射。
      

  2.   

    是不是类似一个新闻发布系统,左面框的按钮点击 然后右面的现实相关内容?index中
    <%@ page contentType="text/html; charset=GBK" %>
    <html>
    <head>
    <title>
    新闻发布系统
    </title>
    </head>
    <frameset rows="100,*">
      <frame scrolling="no" src="top.jsp" name="topFrame" />
      <frameset cols="200,*">
        <frame scrolling="no" name="leftFrame" src="left.jsp"/>
        <frame scrolling="no" name="rightFrame" src="right.jsp"/>
      </frameset>
    </frameset>
    </html>top中
    <%@page contentType="text/html; charset=GBK"%>
    <html>
    <head>
    <title>top</title>
    </head>
    <body bgcolor="#ffffff">
    <img src="img/banner.jpg" height="80" width="100%" alt=""/>
    </body>
    </html>left中
    <%@page contentType="text/html; charset=GBK"%>
    <html>
    <head>
    <title>left</title>
    </head>
    <body bgcolor="#33CC66">
    <br>
    <font size="4">
      <b>新闻发布后台管理</b>
    </font>
    <br>
    <br>
    <a href="firsttitlesubmit.jsp" target="rightFrame">一级标题发布</a>
    <br>
    <a href="secondtitlesubmit.jsp" target="rightFrame">二级标题及文件位置发布</a>
    </body>
    </html>right中
    <%@page contentType="text/html; charset=GBK"%>
    <html>
    <head>
    <title>right</title>
    </head>
    <body bgcolor="#ffffff">
    <img src="img/main-1.gif" alt=""/>
    </body>
    </html>一些图片的链接可以替换的,你要的也许是这些,不是的话 请留言说得清楚些