项目用的是struts标签,有一个结果集以一个table的形式显示在jsp画面上,
在table的首列,显示一个checkbox
以下代码怎么设置的属性jsp页面才能不报错。
 <logic:iterate id="element" indexId="ind" name="reqlist">reqlist,请求的ArrayList
  <tr bgcolor="#f5f4ff">
  <td>
                            <html:checkbox></html:checkbox> //这个地方怎么设置呢,加上这个checkbox就出错 
  </td>
<td>
  <bean:write name="element" property="SHOME"/>SHOME数据字段
  </td>
<td>  
<bean:write name="element" property="SHAINNAMAE"/>
</td>
<td>
<bean:write name="element" property="KARIJIKAN"/>
</td>
<td>
<bean:write name="element" property="JYOTAI"/>
</td>
</tr>
  </logic:iterate>
我怎么样在后台得到选中的值呢,action 和form都怎么写呢。希望各位给个思路。

解决方案 »

  1.   

     <html:checkbox> </html:checkbox>是struts的标签,必须要和你配置的formbean的属性相对应的.也就是说 <html:checkbox>要有property值.和formbean的同名的属性相对应.你这个<html:checkbox>没有property当然会报错了.如果有property但是formbean中没有对应的也会报错的.
      

  2.   

    LZ您的
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    没导入
      

  3.   

    用struts2.0就很简单了,直接前台和后台数据绑定