<body><table border="1">
<tr><th>名称</th><th>品牌</th><th>显示器型号</th><th>CPU型号</th><th>硬盘容量</th><th>内存容量</th><th></th></tr>
<logic:present name="result">
<logic:iterate id="computer" name="result" type="com.bean.computerBean" >
<logic:present name="computer">
<tr>
<td><bean:write name="computer" property="name" /></td>
<td><bean:write name="computer" property="brand" /></td>
<td><bean:write name="computer" property="monitornum" /></td>
<td><bean:write name="computer" property="cpunum" /></td>
<td><bean:write name="computer" property="hardsize" /></td>
<td><bean:write name="computer" property="memorysize" /></td>
<td><a href="computer.do?method=deleteComputer?id=??????????">删除</a></td>
</tr>
</logic:present>
</logic:iterate>
</logic:present>
</table><logic:equal name="page" property="hasNextPage" value="true">
<html:link page="/page.do?action=nextPage">nextPage</html:link>
</logic:equal>
<logic:equal name="page" property="hasPreviousPage" value="true">
<html:link page="/page.do?action=previousPage">PreviousPage</html:link>
</logic:equal>共有数据总数<bean:write name="page" property="totalRows"/>;
共分<bean:write name="page" property="totalPages"/>页,当前是第
<bean:write name="page" property="currentPage"/>页
</body>功能就是把数据库中的记录读出来 以表格形式显示出来 每条记录有一个删除链接 我想传递这条记录对应的id值 不知道该怎么传啊 哪位高手指点一下啊 急等
<tr><th>名称</th><th>品牌</th><th>显示器型号</th><th>CPU型号</th><th>硬盘容量</th><th>内存容量</th><th></th></tr>
<logic:present name="result">
<logic:iterate id="computer" name="result" type="com.bean.computerBean" >
<logic:present name="computer">
<tr>
<td><bean:write name="computer" property="name" /></td>
<td><bean:write name="computer" property="brand" /></td>
<td><bean:write name="computer" property="monitornum" /></td>
<td><bean:write name="computer" property="cpunum" /></td>
<td><bean:write name="computer" property="hardsize" /></td>
<td><bean:write name="computer" property="memorysize" /></td>
<td><a href="computer.do?method=deleteComputer?id=??????????">删除</a></td>
</tr>
</logic:present>
</logic:iterate>
</logic:present>
</table><logic:equal name="page" property="hasNextPage" value="true">
<html:link page="/page.do?action=nextPage">nextPage</html:link>
</logic:equal>
<logic:equal name="page" property="hasPreviousPage" value="true">
<html:link page="/page.do?action=previousPage">PreviousPage</html:link>
</logic:equal>共有数据总数<bean:write name="page" property="totalRows"/>;
共分<bean:write name="page" property="totalPages"/>页,当前是第
<bean:write name="page" property="currentPage"/>页
</body>功能就是把数据库中的记录读出来 以表格形式显示出来 每条记录有一个删除链接 我想传递这条记录对应的id值 不知道该怎么传啊 哪位高手指点一下啊 急等
解决方案 »
- structs2 boolean类型属性 接收 jsp页面 0 1
- 如何用最简单的java程序获得 3个 可用的端口?
- HashMap<String, String> mapData +long to String
- 初学J2EE,SQL错误关于Statement.RETURN_GENERATED_KEYS
- 我的weblogic报如下错误,困扰我一上午了,谁帮忙看看!不胜感激
- 还是那个该死的RMI找不到Stub类的问题
- 我快要风了
- 救命!!!!!!JBuilder X里为什么总是无法添加MySQL JDBC驱动呢?
- 关于log4j的问题
- websphere下报java.lang.NoSuchMethodError
- Struts2的校验文件在SHH2框架中不起作用?
- 请教关于struts2的框架验证
equest.getParameter("id");
用form获取
前提是你又对应的form 然后用他的get方法
struts好像把红色部分都当成方法名了 没法传递参数啊
在strust 配置property属性,然后再后台取值
<s:iterator value="#request.user">
<td><a href='computer.do?method=deleteComputer?id=<s:property value="id" />'>删除</a></td>
</s:iterator>