2016-07-29 5 views
-1

Ich möchte nur 3 Datensätze in jeder Zeile auf JSP-Seite anzeigen. Das Datensatzfeld ist nur eins (z. B. Produktname). Daher wird in jeder Zeile nur T3-Produktname angezeigt. Wie in JSP ausführen?Möchten Daten in Tabellenform in JSP anzeigen

1 | 2 | 3


4 | 5 | 6


7 | 8 | 9

bitte helfen !!!

Antwort

0

Suchst du das?

<%@ 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> 
+0

Nein, Sir Nicht so. Ich möchte einzelne Spaltenwerte in Tabellenform 3x3-Matrix drucken. So etwas wie wir Produkte anzeigen können. – Vish

Verwandte Themen