jsp实现图片换行显示
<c:set var="index" value="1" /> <table> <c:forEach items="${movies}" var="movie" > ${index%5==1 ? "<tr>" : "" } <td> <table> <tr><td><img height="300" width="220" src =${movie.cover } /> </td></tr> <tr><td align="center">${movie.name } </td></tr> </table> </td> ${index%5==0 ?"</tr>" : "" } <c:set var="index" value="${index+1}" /> </c:forEach> </table>