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