这是 书上的Testout.jsp的代码!我把action的值它改成了 action="/TestAction
<%@ page contentType="text/html;charset=GB2312" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html >
<head>
<title>
</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</head>
<body bgColor=white>
<html:base />
<table cellSpacing=0 borderColorDark=#ffffff cellPadding=3 width="98%" bgColor=#e6f2e7 borderColorLight=#008000 border=1>
<TBODY>
<tr bgColor=#90c090>
<td>
<DIV align=center>
<span contentEditable=true>username</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>usertime</span><DIV align=left></DIV>
</DIV>
</td>
<td>
<DIV align=center>
<span contentEditable=true>jiangjin</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center>
<span contentEditable=true>password</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>删除</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>编辑</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>链接</span><DIV align=left></DIV></DIV>
</td>
</tr>
<logic:iterate scope="request" type="com.li.Test" id="Test" name="Test">
<logic:notEqual name="TestForm" value="update" property="action">
<tr>
<form action="TestAction.do?search=search&expression=<bean:write name='Test' property='username' />" method=post name="TestForm">
<td>
<bean:write name="Test" property="username" />
</td>
<td>
<bean:write name="Test" property="usertime" />
</td>
<td>
<bean:write name="Test" property="jiangjin" />
</td>
<td>
<bean:write name="Test" property="password" />
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.remove' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.edit' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.link' />
</html:submit>
</td>
</FORM>
</tr>
</logic:notEqual>
<logic:equal name="TestForm" value="update" property="action">
<tr>
<form action="TestAction.do?search=search&expression=<bean:write name='Test' property='username' />" method=post name="TestForm">
<td>
<html:text name="Test" property="username" />
</td>
<td>
<html:text name="Test" property="usertime" />
</td>
<td>
<html:text name="Test" property="jiangjin" />
</td>
<td>
<html:text name="Test" property="password" />
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.remove' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.update' />
</html:submit>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.cancel' />
</html:submit>
</FORM>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.link' />
</html:submit>
</td>
</tr>
</logic:equal>
</logic:iterate>
<tr>
<TD align=middle colSpan=7>
<bean:write name="TestForm" property="pagestr" filter="false" />
</td>
</tr>
</tr>
</TBODY>
</table>
</body>
</html:html >
<%@ page contentType="text/html;charset=GB2312" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html >
<head>
<title>
</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</head>
<body bgColor=white>
<html:base />
<table cellSpacing=0 borderColorDark=#ffffff cellPadding=3 width="98%" bgColor=#e6f2e7 borderColorLight=#008000 border=1>
<TBODY>
<tr bgColor=#90c090>
<td>
<DIV align=center>
<span contentEditable=true>username</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>usertime</span><DIV align=left></DIV>
</DIV>
</td>
<td>
<DIV align=center>
<span contentEditable=true>jiangjin</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center>
<span contentEditable=true>password</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>删除</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>编辑</span><DIV align=left></DIV></DIV>
</td>
<td>
<DIV align=center><span contentEditable=true>链接</span><DIV align=left></DIV></DIV>
</td>
</tr>
<logic:iterate scope="request" type="com.li.Test" id="Test" name="Test">
<logic:notEqual name="TestForm" value="update" property="action">
<tr>
<form action="TestAction.do?search=search&expression=<bean:write name='Test' property='username' />" method=post name="TestForm">
<td>
<bean:write name="Test" property="username" />
</td>
<td>
<bean:write name="Test" property="usertime" />
</td>
<td>
<bean:write name="Test" property="jiangjin" />
</td>
<td>
<bean:write name="Test" property="password" />
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.remove' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.edit' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.link' />
</html:submit>
</td>
</FORM>
</tr>
</logic:notEqual>
<logic:equal name="TestForm" value="update" property="action">
<tr>
<form action="TestAction.do?search=search&expression=<bean:write name='Test' property='username' />" method=post name="TestForm">
<td>
<html:text name="Test" property="username" />
</td>
<td>
<html:text name="Test" property="usertime" />
</td>
<td>
<html:text name="Test" property="jiangjin" />
</td>
<td>
<html:text name="Test" property="password" />
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.remove' />
</html:submit>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.update' />
</html:submit>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.cancel' />
</html:submit>
</FORM>
</td>
<td>
<html:submit value="提交查询内容" property="action" >
<bean:message key='button.link' />
</html:submit>
</td>
</tr>
</logic:equal>
</logic:iterate>
<tr>
<TD align=middle colSpan=7>
<bean:write name="TestForm" property="pagestr" filter="false" />
</td>
</tr>
</tr>
</TBODY>
</table>
</body>
</html:html >
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货