我用是frameset框架在action中用request.setAttr()传到主页index.jsp 中,怎样能使left,jsp得到request的值呢?我要用left.jsp做一个树形菜单。请各位帮帮忙!我该怎么做?不能用session

解决方案 »

  1.   

    没明白你的真实意思。
    <frameset name="fram1" framespacing="0" border="0" frameborder="0"
    rows="30,*" frameSpacing="0" frameBorder="0">
    <frame name="DesktopTop" target="DesktopTop" src="topPage.xhtml" scrolling="no" noresize="noresize" marginWidth="0" marginHeight="0"></frame>
    <frameset name="fram2" framespacing="0" border="0" frameborder="0" cols="190,*">
    <frame name="DesktopLeft" src="leftMenu.xhtml" scrolling="auto" noresize="noresize" marginWidth="0" marginHeight="0"></frame>
    <frame name="DesktopContent" src="privilege/PRIVILEGE03001_01_ListUser.xhtml" crolling="auto" noresize="noresize" marginWidth="0" marginHeight="0"></frame>
    </frameset>
    </frameset>你的框架应该类似于上面,下来你说说,你的情形是什么。
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>服务器监控系统</title>
    </head> <frameset cols="*" rows="136, *" id="frame_main" border="0">
    <frame src="header.jsp" noresize="noresize" name="header">    <frameset cols="240, *">
        <frame src="menu.jsp" name="menu">
    <frame src="main.jsp" name="main">
    </frameset>
    </frameset>
    <noframes>
    <body>
    </body>
    </noframes>
    </html>这是我的index.jsp 我用的是struts2,在我的通过一个action转到index.jsp主页面,我在action中用request.setAttribute("a"),转到index.jsp中我想再menu.jsp中得到这个a为什么得不到?
      

  3.   


    你理解request 和session的范围吗?
    request存值,只在request范围内有效。