我想用<logic:equal>标签来判断传过来的一个actionform的值,代码如下:
<logic:iterate id="forms" name="forumForms">//forumForms是一个包含bean的ArrayList
<TR>
<TD><bean:write name="forms" property="name"></TD>
<TD><bean:write name="forms" property="re"></TD>
<logic:equal name="forms" value="" property="status">//这里不知道该怎么用status是bean里的属性只有两个值0和1;进行判断
<TD>开启</TD>
</logic:equal>
<logic:equal name="forms" value="" property="status">
<TD>关闭</TD>
</logic:equal>
</TR>
</logic:iterate>

解决方案 »

  1.   

    你好象搞的不是很明白,首先name应该时actionform的名字,而不应该是ArrayList的名字,你应该在actionForm里写一个arrayList的变量,从你的起名看好像是一个论坛,你应该在action里取得相应的list,并set进去,
    例如在form里定义List list = new ArrayList();
    在action中给list赋上相应的值,调用form的set方法
    在jsp页面上
    <logic:iterate id="forms" name="forumForms" property="list">这样的话应该就可以了
    在使用status进行判断时,直接将value=“0”或者“1”就可以了