This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Collection c = (Collection) session.getAttribute("list"); Pagination dto = (Pagination)c.iterator().next(); <!--I need only the first DT--> String userName= dto.getUserName();
and I want to write once with Struts the value of the property userName. Why the code
<bean:write name="dto" property="userName">
posted 9 years ago
Hi Giulietta, Add your collection to a ArrayList variable in the FormBean.Then use the following code in your JSP.It should work. (Change your FormName/domain/app/applicably) <logic:iterate id="abc" name="yourForm" property="paginationList" type="com.yourdomain.yourApp.dto.PaginationDTO"> <tr> <td> <bean:write name="abc" property="userName" /> </td> </tr>