-1

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!!!

Vish
  • 91
  • 1
  • 9

1 Answers1

0

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>
Rae Burawes
  • 892
  • 7
  • 18
  • No sir Not like that. I want to print single column values in table form 3x3 matrix. Something like we can display products. – Vish Jul 29 '16 at 18:10