<logic:iterate id="alinkman" indexId="index" name="alLinkMan" >

解决方案 »

  1.   

    <!-- <td ><div align="center"><bean:write name="ind"/></div></td> -->
    注释不对把
    直接把这行删掉看看
      

  2.   

    myth822(枫红一刀) 说的对,id代表循环取出的item变量名,name是attribute中的list的名称。
      

  3.   

    你的写法不对!<logic:notEmpty name="alLinkMan(这里是你后台传过来的list)">     //可以不要     <logic:iterate id="user(每一条记录对应的对象)" name="alLinkMan(这里是你后台传过来的list)" type="对应的类">         。
           <bean:write name="user" property="lName" />..........
         </logic:iterate>
    </logic:notEmpty >
    这样就可以了!
    ------------------------------
    你这里写错了!
    <logic:iterate id="alinkman" indexId="ind" name="querylinkmankey" >name属性对应的才是后台传过来的list ,而id属性对应的是当前记录的对象。
      

  4.   

    <logic:iterate id="alinkman" indexId="ind" name="querylinkmankey" >
    name="querylinkmankey"就是存储在session中的arraylist对应的属性名
    在后台的语句是:session.setAttribute("querylinkmankey",linkmanList);//linkmanList是arraylist名称
    id="alinkman"是我为每个在arraylist中的元素即linkmanBean的取的名字我觉得和楼上各位说的一样,怎么会有错误呢
      

  5.   

    应该用hashmap给解析出来 再取值吧
      

  6.   


    In my situation I was using the Struts logic:iterate tag to display a
    list of items in a jsp.  I finally solved (avoided?) the problem by
    creating a very simple bean that contained ONLY the ArrayList of the
    objects I wanted to display and nothing else. With the appropriate
    getter/setter in place Struts agreed to find the getter method.  The
    class I was using before also had the right getter method, but for some
    reason, Struts would not see it.  There were many other methods in the
    class, but all the documentation I read indicated it should have worked.
    I know I am blaming Struts and that might not be fair, but I see a lot
    of comments about this issue on the message boards.I never found the reason why, but now it works everywhere.