I want to display only 3 records in each row on jsp page. The record field is only one (such as Product Name). So only T3 Product Name display on each row. How to perform in JSP?
1 | 2 | 3
4 | 5 | 6
7 | 8 | 9
please help!!!
Are you looking for this?
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Table Example</title>
</head>
<body>
<div align="center">
<table border="1" cellpadding="5">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<c:forEach var="data" items="${your list here}">
<tr>
<td><c:out value="${value here}" /></td>
<td><c:out value="${value here}" /></td>
<td><c:out value="${value here}" /></td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>