java,Action,strurs

yxmzhg 2010-09-17 05:15:50
主页面如下

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<frameset rows="168,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="top.jsp" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frameset rows="*" cols="174,*" framespacing="0" frameborder="no" border="0">
<frame src="file/life.jsp" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="file/down.jap" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>


跳到这个页面时的同时加载 top.jsp,left.jsp,down.jsp页面,这3个子页面都对应一个Action;分别是MS201Action,MS202Action,MS203Action.

怎么写才能加在进去,我用的是struts 1.2


·····大哥们帮帮忙!!!
...全文
239 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
yxmzhg 2010-09-20
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 superman1986 的回复:]
<html:form action="/ms/MS2003Action">
是不是要这样写:<html:form action="/ms/MS2003Action.do">
另外确认下 struts—config.xml里action的path是不是/MS2003Action??
[/Quote]

路径是正确的 我WEB.XML是 /do/* 不加.do
yxmzhg 2010-09-19
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 leiy21003 的回复:]
这个只能通过Session传值!你可以再经过一个处理页面跳到action在跳到top页面啊,在这个处理页面的action里面传你要的参数,在跳到top页面。
[/Quote]

<action path="/ms/MS2003Action"
type="bei.ms.action.MS2003Action"
name="MS2000Form"
scope="request"
validate="false"
parameter="dispatch">
<forward name="Display3" path="/pages/MS2003D.jsp" />
leiy21003 2010-09-18
  • 打赏
  • 举报
回复
这个只能通过Session传值!你可以再经过一个处理页面跳到action在跳到top页面啊,在这个处理页面的action里面传你要的参数,在跳到top页面。
licip 2010-09-18
  • 打赏
  • 举报
回复
楼上说的对,不过,后面不要忘了加.do
wdyq8687 2010-09-18
  • 打赏
  • 举报
回复

就一个一个写进去,就好了啊
gouxiongyaya 2010-09-18
  • 打赏
  • 举报
回复
对啊,你在top.jsp里的action="MS201Action"
left.jsp里的action="MS202Action"
down.jsp里的action="MS203Action"
不就行了。。。
superman1986 2010-09-18
  • 打赏
  • 举报
回复
<html:form action="/ms/MS2003Action">
是不是要这样写:<html:form action="/ms/MS2003Action.do">
另外确认下 struts—config.xml里action的path是不是/MS2003Action??
lyxqm 2010-09-18
  • 打赏
  • 举报
回复
好问题 学习学习 。。。。
yxmzhg 2010-09-18
  • 打赏
  • 举报
回复
也 就是说根本没进Action
yxmzhg 2010-09-18
  • 打赏
  • 举报
回复
谢谢大家帮忙 但是 Action 取的值传不到form里啊


<html:form action="/ms/MS2003Action">
<html:hidden property="dispatch" value=""/>

<logic:present name="ms2000Form" property="searchList">
<logic:iterate id="search" name="ms2000Form" property="searchList">
<tr>
<TD width="49" height="30" bordercolor="#ECE9D8" class=gridViewItem style="WIDTH: 50px">
<div align="center"><input type="checkbox" name="checkbox" id="checkbox1" /></div></TD>
<TD width="100" height="30" bordercolor="#ECE9D8" class=gridViewItem>
<div align="center" class="STYLE22"><bean:write name="search" property="userId"/></div></TD>
<TD width="102" height="30" bordercolor="#ECE9D8" class=gridViewItem>
<div align="center" class="STYLE22"><bean:write name="search" property="userName"/></div></TD>
<TD width="105" height="30" bordercolor="#ECE9D8" class=gridViewItem>
<div align="center" class="STYLE22"><bean:write name="search" property="comPany"/></div></TD>
<TD height="30" bordercolor="#ECE9D8" class=gridViewItem>
<div align="center" class="STYLE22"><bean:write name="search" property="confStat"/></div></TD>
<TD height="30" bordercolor="#ECE9D8" class=gridViewItem>
<div align="center" class="STYLE22"><bean:write name="search" property="powerState"/></div></TD>
<TD height="30" bordercolor="#ECE9D8" class=STYLE23>
<div align="center"><span class="STYLE24">
<input type="button" name="detail" value="删除" onclick="checkConsult()">
<input type="button" name="update" value="查看" onclick="checkUpdate()">
<input type="button" name="delete7" value="管理" onclick="checkDelete ()">
</span></div></TD>
</tr></logic:iterate></logic:present>
</html:form>
wula0010 2010-09-17
  • 打赏
  • 举报
回复
你在各个页面各写各的啊,有什么问题?

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧