struts 的iterate

action

request.setAttribute("all", dao.findAll());



jsp



<logic:iterate id="element2" indexId="ind" name="all">
  <bean:write name="ind"/>.
  <bean:write name="element2" property="name"/><BR>
  <bean:write name="element2" property="pwd"/><BR>
</logic:iterate>


<logic:iterate name="all" indexid="ind" id="element2">
  <bean:write name="ind">.
  <bean:write property="name" name="element2">

  <bean:write property="pwd" name="element2">

</bean:write></bean:write></bean:write></logic:iterate>

你可能感兴趣的:(DAO,bean,jsp,struts)