java/nekurak.net-web/web/hibernate.jsp
author František Kučera <franta-hg@frantovo.cz>
Thu Feb 18 15:01:37 2010 +0100 (2010-02-18)
changeset 34 f9ca0203fec5
permissions -rw-r--r--
Added tag 5. díl for changeset 9f9840afa18f
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     3 	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     4 	  version="2.0">
     5     <jsp:directive.page contentType="application/xhtml+xml"/>
     6     <jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
     7 		doctype-root-element="html"
     8 		omit-xml-declaration="false"/>
     9 
    10     <html xmlns="http://www.w3.org/1999/xhtml">
    11 	<head>
    12 	    <title>Nekuřák.net</title>
    13 	    <link href="styl.css" type="text/css" rel="StyleSheet"/>
    14 	</head>
    15 	<body>
    16 	    <h1>Nekuřák.net – Hibernate:</h1>
    17 	    <p>Načítáme údaje z databáze.</p>
    18 
    19 	    <p>Seznam podniků načtený pomocí Hibernate:</p>
    20 	    <!-- Vytvoříme si instanci JavaBeany -->
    21 	    <jsp:useBean id="podnikyWeb" class="cz.frantovo.nekurak.web.PodnikyHibernateWeb" scope="request"/>
    22 	    <table>
    23 		<thead>
    24 		    <tr>
    25 			<td>Číslo</td>
    26 			<td>Název</td>
    27 		    </tr>
    28 		</thead>
    29 		<tbody>
    30 		    <c:forEach var="p" items="${podnikyWeb.podniky}">
    31 			<tr>
    32 			    <td><c:out value="${p.id}"/></td>
    33 			    <td><c:out value="${p.nazev}"/></td>
    34 			</tr>
    35 		    </c:forEach>
    36 		</tbody>
    37 	    </table>
    38 
    39 	</body>
    40     </html>
    41 
    42 </jsp:root>