首页代码:
index.html<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>Shopping Online</title>
</head> <frameset rows="21,*,63" framespacing="0" border="0" frameborder="0">
<frame name="top" scrolling="no" noresize target="contents"
src="top.html" marginwidth="0" marginheight="0">
<frameset cols="183,*">
<frame name="contents" target="main" src="left.jsp" scrolling="no">
<frame name="main" src="main.jsp">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents"
src="bottom.html">
<noframes>
<body> </body>
</noframes>
</frameset></html>
打开首页的时候,怎样做才能向struts2的action提交请求,使left.jsp和main.jsp得到数据库的数据

解决方案 »

  1.   

    <%@ taglib prefix="s" uri="/struts-tags" %><html>
        <head>
            <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
            <title>Shopping Online</title>
        </head>    <frameset rows="21,*,63" framespacing="0" border="0" frameborder="0">
            <frame name="top" scrolling="no" noresize target="contents"
                src="top.html" marginwidth="0" marginheight="0">
            <frameset cols="183,*">
                <frame name="contents" target="main" src="<s:url action="请求名1" namespace="命名空间" />" scrolling="no">
                <frame name="main" src="<s:url action="请求名2" namespace="命名空间" />">
            </frameset>
            <frame name="bottom" scrolling="no" noresize target="contents"
                src="bottom.html">
            <noframes>
                <body>            </body>
            </noframes>
        </frameset></html>
      

  2.   

    如果你是用的servlet或者struct,你不能直接写left.jsp,你应该通过执行servlet或者struct的action来重定向到left.jsp,
    如果你jsp语句的话是可以直接使用left.jsp的。