我jsp页面有这么一段代码
<center> <font color="red">用户详细信息</font>
<table cellpadding="0" cellspacing="0" align="center" border="0" width="80%">
<thead>
<tr align="center">
<th>账号</th>
<th>姓名</th>
<th>口令</th>
<th>性别</th>
<th>年龄</th>
<th>爱好</th>
<th>操作</th>
</tr>
</thead> <tbody>
<s:iterator id="mylist" value="#request.list">
<tr align="center">
<td><s:property value="#mylist.userId"/></td>
<td><s:property value="#mylist.userName"/></td>
<td><s:property value="#mylist.userPwd"/></td>
<td><s:property value="#mylist.userSex"/></td>
<td><s:property value="#mylist.userAge"/></td>
<td><s:property value="#mylist.userFav"/></td>
<td>
<!--
<a href="update.jsp">修改</a>
-->
<a href='<s:url action="edit"><s:param name="userId" value="userId"></s:param></s:url>'>修改</a>
<a href='<s:url action="delete"><s:param name="userId" value="userId"></s:param></s:url>'>删除</a>
<a href='<s:url action="insert"><s:param name="userId" value="userId"></s:param></s:url>'>添加</a>
</td>
</tr>
</s:iterator>当我点击修改操作后,跳转到action 中,在action是这么接收值的。private String userId;实现它的get和set方法。然后把 id直接传到修改方法中。这么写行吗
<center> <font color="red">用户详细信息</font>
<table cellpadding="0" cellspacing="0" align="center" border="0" width="80%">
<thead>
<tr align="center">
<th>账号</th>
<th>姓名</th>
<th>口令</th>
<th>性别</th>
<th>年龄</th>
<th>爱好</th>
<th>操作</th>
</tr>
</thead> <tbody>
<s:iterator id="mylist" value="#request.list">
<tr align="center">
<td><s:property value="#mylist.userId"/></td>
<td><s:property value="#mylist.userName"/></td>
<td><s:property value="#mylist.userPwd"/></td>
<td><s:property value="#mylist.userSex"/></td>
<td><s:property value="#mylist.userAge"/></td>
<td><s:property value="#mylist.userFav"/></td>
<td>
<!--
<a href="update.jsp">修改</a>
-->
<a href='<s:url action="edit"><s:param name="userId" value="userId"></s:param></s:url>'>修改</a>
<a href='<s:url action="delete"><s:param name="userId" value="userId"></s:param></s:url>'>删除</a>
<a href='<s:url action="insert"><s:param name="userId" value="userId"></s:param></s:url>'>添加</a>
</td>
</tr>
</s:iterator>当我点击修改操作后,跳转到action 中,在action是这么接收值的。private String userId;实现它的get和set方法。然后把 id直接传到修改方法中。这么写行吗
解决方案 »
- DatabaseMetaData.getProcedureColumns方法疑惑
- jasperreports web打印 没反应
- SSH2登陆实例总是出错,求答谢解救
- hibernate和ibtais
- 自己写的hibernae主键生成器问题
- 怎样断开网络时使用struts?
- 关于 import netscape.javascript.jsobject的问题
- 请达人、高手、TX们帮我把开发环境搭一个出来。
- 高分求助:TOMCAT的使用问题!
- 冒昧问一句,OpenTools和EJB有什么关系,EJB有那么重要吗,我用JBuilder里的大部分控件就可以搞定大部分程序了?
- 求帮忙把一个java application转换成为 java applet
- 【新手学java】myeclipse+sql server2000在jsp中进行数据库操作
param标签使用name属性来指定参数名