I have a simple test project in Spring 3, basically a method inside the controller that retrieves the data from the arraylist and "should" pass it to the Thsi view: what the method looks like:
@RequestMapping(value="/showUsers") public String showUsers(Model model){ ArrayList<User> users=this.copy(); model.addAttribute(users); return "showUsers"; }
And here is jsp (showUsers.jsp)
Both of them are executed without the logs or warnings that are displayed in the view, but without the data ArrayList<User>
<table align="center" border="1"> <tr> <td>Nr:</td><td>Name:</td><td>Email</td><td>Modify?</td> </tr> <c:forEach var="user" items="${users}" varStatus="status"> <tr> <td><c:out value="${status.count}"/></td><td><c:out value="${user.name}"/></td> <td><c:out value="${user.email}"/></td><td>Modify</td> </tr> </c:forEach> </table>
Any tips? Thanks!
source share