java/nekurak.net-web/web/hibernate.jsp
changeset 34 f9ca0203fec5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/nekurak.net-web/web/hibernate.jsp	Thu Feb 18 15:01:37 2010 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     1.6 +	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     1.7 +	  version="2.0">
     1.8 +    <jsp:directive.page contentType="application/xhtml+xml"/>
     1.9 +    <jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    1.10 +		doctype-root-element="html"
    1.11 +		omit-xml-declaration="false"/>
    1.12 +
    1.13 +    <html xmlns="http://www.w3.org/1999/xhtml">
    1.14 +	<head>
    1.15 +	    <title>Nekuřák.net</title>
    1.16 +	    <link href="styl.css" type="text/css" rel="StyleSheet"/>
    1.17 +	</head>
    1.18 +	<body>
    1.19 +	    <h1>Nekuřák.net – Hibernate:</h1>
    1.20 +	    <p>Načítáme údaje z databáze.</p>
    1.21 +
    1.22 +	    <p>Seznam podniků načtený pomocí Hibernate:</p>
    1.23 +	    <!-- Vytvoříme si instanci JavaBeany -->
    1.24 +	    <jsp:useBean id="podnikyWeb" class="cz.frantovo.nekurak.web.PodnikyHibernateWeb" scope="request"/>
    1.25 +	    <table>
    1.26 +		<thead>
    1.27 +		    <tr>
    1.28 +			<td>Číslo</td>
    1.29 +			<td>Název</td>
    1.30 +		    </tr>
    1.31 +		</thead>
    1.32 +		<tbody>
    1.33 +		    <c:forEach var="p" items="${podnikyWeb.podniky}">
    1.34 +			<tr>
    1.35 +			    <td><c:out value="${p.id}"/></td>
    1.36 +			    <td><c:out value="${p.nazev}"/></td>
    1.37 +			</tr>
    1.38 +		    </c:forEach>
    1.39 +		</tbody>
    1.40 +	    </table>
    1.41 +
    1.42 +	</body>
    1.43 +    </html>
    1.44 +
    1.45 +</jsp:root>