日期:2014-05-17  浏览次数:20683 次

struts2关于request,session,application传值与显示的问题
有一个主框架. 名为main.jsp
HTML code

    </head>
    <frameset rows="127,*,11" frameborder="no" border="0" framespacing="0">
        <frame src="top.jsp" name="topFrame" scrolling="no"
            noresize="noresize" id="topFrame" />
        <frame src="center.jsp" name="mainFrame" id="mainFrame" />
        <frame src="down.jsp" name="bottomFrame" scrolling="no"
            noresize="noresize" id="bottomFrame" />
    </frameset>
    <noframes>
        <body>
        </body>
    </noframes>
</html>




其中center.jsp为主要内容,但是也为一个框架,分左右两个页面
HTML code

<body>
        <table width="100%" height="100%" border="0" cellspacing="0"
            cellpadding="0">
            <tr>
                <td width="8" bgcolor="#353c44">
                    &nbsp;
                </td>
                <td width="147" valign="top">
                    <iframe height="100%" width="100%" border="0" frameborder="0"
                        src="left.jsp" name="leftFrame" id="leftFrame" title="leftFrame"></iframe>
                </td>
                <td width="10" bgcolor="#add2da">
                    &nbsp;
                </td>
                <td valign="top">
                    <iframe height="100%" width="100%" border="0" frameborder="0"
                        src="right.jsp" name="rightFrame" id="rightFrame"
                        title="rightFrame"></iframe>
                </td>
                <td width="8" bgcolor="#353c44">
                    &nbsp;
                </td>
            </tr>
        </table>
    </body>




left.jsp.主要是从request里获取到treeList进行循环
HTML code

<body>
        <div style="height: 100%;">
            <ul id="navigation">
                <s:iterator value="#request.treeList" id="tree">
                    <s:iterator value="#request.tree" id="treeName" status="tn">
                        <li>
                            <a class="head"><s:property value="key" /> </a>
                            <ul>
                                <s:iterator value="#treeName.value" id="treeNodeName"
                                    var="treeNodeName">
                                    <li>
                                        <a href="information.html" target="rightFrame">${treeNodeName.functionName}
                                        </a>
                                    </li>
                                </s:iterator>
                            </ul>
                        </li>
                    </s:iterator>
                </s:iterator>
            </ul>
        </div>
    </body>