franta-hg@3: <?xml version="1.0" encoding="UTF-8"?>
franta-hg@10: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
franta-hg@10: 	  xmlns:c="http://java.sun.com/jsp/jstl/core"
franta-hg@30: 	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
franta-hg@10: 	  version="2.0">
franta-hg@3:     <jsp:directive.page contentType="application/xhtml+xml"/>
franta-hg@3:     <jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
franta-hg@3: 		doctype-root-element="html"
franta-hg@3: 		omit-xml-declaration="false"/>
franta-hg@3: 
franta-hg@31:     <fmt:setLocale value="cs"/>
franta-hg@31:     <c:if test="${param.jazyk == 'en'}">
franta-hg@31: 	<fmt:setLocale value="en"/>
franta-hg@31:     </c:if>
franta-hg@30:     <fmt:setBundle basename="cz.frantovo.nekurak.preklady" scope="application"/>
franta-hg@30: 
franta-hg@3:     <html xmlns="http://www.w3.org/1999/xhtml">
franta-hg@3: 	<head>
franta-hg@30: 	    <title><fmt:message key="nazev"/></title>
franta-hg@26: 	    <link href="styl.css" type="text/css" rel="StyleSheet"/>
franta-hg@3: 	</head>
franta-hg@3: 	<body>
franta-hg@30: 	    <h1><fmt:message key="nazev"/></h1>
franta-hg@30: 	    <p><fmt:message key="popis"/></p>
franta-hg@8: 
franta-hg@31: 	    <p><fmt:formatNumber value="1234567890" pattern="###,###.###"/></p>
franta-hg@31: 
franta-hg@10: 
franta-hg@10: 	    <!-- jednoduchá podmínka -->
franta-hg@10: 	    <c:if test="${param.akce == 'informace'}">
franta-hg@10: 		<p>Vypíšeme nějaké informace.</p>
franta-hg@10: 	    </c:if>
franta-hg@10: 
franta-hg@10: 	    <!-- složitější větvení -->
franta-hg@10: 	    <c:choose>
franta-hg@10: 		<!-- if -->
franta-hg@10: 		<c:when test="${param.akce == 'seznam'}">
franta-hg@26: 		    <p>Vypíšeme seznam podniků:</p>
franta-hg@10: 		    <!-- Vytvoříme si instanci JavaBeany -->
franta-hg@14: 		    <jsp:useBean id="podnikyWeb" class="cz.frantovo.nekurak.web.PodnikyWeb" scope="request"/>
franta-hg@26: 		    <table>
franta-hg@26: 			<thead>
franta-hg@26: 			    <tr>
franta-hg@26: 				<td>Číslo</td>
franta-hg@26: 				<td>Název</td>
franta-hg@26: 			    </tr>
franta-hg@26: 			</thead>
franta-hg@26: 			<tbody>
franta-hg@26: 			    <c:forEach var="p" items="${podnikyWeb.podniky}">
franta-hg@26: 				<tr>
franta-hg@26: 				    <td><c:out value="${p.id}"/></td>
franta-hg@26: 				    <td><c:out value="${p.nazev}"/></td>
franta-hg@26: 				</tr>
franta-hg@26: 			    </c:forEach>
franta-hg@26: 			</tbody>
franta-hg@26: 		    </table>
franta-hg@10: 		</c:when>
franta-hg@10: 		<!-- else if -->
franta-hg@10: 		<c:when test="${param.akce == 'podrobnosti'}">
franta-hg@10: 		    <p>Vypíšeme podrobnosti.</p>
franta-hg@10: 		</c:when>
franta-hg@10: 		<!-- else -->
franta-hg@10: 		<c:otherwise>
franta-hg@10: 		    <p>Zobrazíme úvodní stránku.</p>
franta-hg@10: 		</c:otherwise>
franta-hg@10: 	    </c:choose>
franta-hg@10: 
franta-hg@16: 	    <!-- vložíme si obsah jiného souboru.
franta-hg@16: 		 Obsah adresáře WEB-INF není přímo dostupný uživateli -->
franta-hg@8: 	    <jsp:include page="WEB-INF/casti/paticka.jsp">
franta-hg@8: 		<jsp:param name="rok" value="2010" />
franta-hg@8: 	    </jsp:include>
franta-hg@3: 	</body>
franta-hg@3:     </html>
franta-hg@3: 
franta-hg@3: </jsp:root>