<logic:iterate id="rowname" name="datalist" scope = "request"> 
<tr>
<td>
<%
String auto_id=
%>
<bean:write name="rowname" property = "auto_id"/>
</td>
<td>
<bean:write name="rowname" property = "comment_ip"/>
</td>
<td>
<bean:write name="rowname" property    = "content"/>
</td>
</tr>
</logic:iterate>
auto_id 怎么获取和下面对应的值啊??

解决方案 »

  1.   

    为啥要给auto_id 赋值啊,如果判断可以使用logic equal进行判断
      

  2.   

    <a href="<URL><bean:write name="rowname" property="auto_id"/>"> <bean:write name="rowname" property="auto_id" /> </a>
    这样可以根据auto_id链接,如果要得一个String auto_id的值,你得循环中的哪个,还是只保存最的一个???
      

  3.   

    <html:select  name="info_state" value="<bean:write name='row' property = 'info_state'/>" property = "info_state">  
     <html:option value="0">未审核</html:option>
     <html:option value="1">精品推荐</html:option>
     <html:option value="2">已审核不是精品</html:option>
     </html:select> 这个为什么显示不出来那个默认的
      

  4.   

    有可能<bean:write name="row" property = "info_state"/>值不存在 你仔细检查一下吧
    value中的值应该是数字 
    <%
     String auto_id=""
     pageContext.setAttribute("test",auto_id);
    %>
    用EL表达是给他显示出来
    ${test}