Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ 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>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Tiedot</title>
- </head>
- <body>
- <h1>Tiedot</h1>
- <form action="TiedotServlet" method="get">
- Choose:<br>
- <select name="choice">
- <option></option> <!-- ensimmäisenä tyhjä vaihtoehto -->
- <c:forEach var="a" items="${tiedot}">
- <option>${a.nimi }</option>
- </c:forEach>
- </select>
- <input type="submit" value="Submit">
- </form>
- <c:if test="${not empty atiedot }">
- <h2>Detailed information</h2>
- <p>
- <table>
- <tr><td>Nimi:</td><td> ${atiedot.nimi }</td></tr>
- <tr><td>Lahiosoite:</td><td> ${atiedot.osoite }</td></tr>
- <tr><td>Postinumero:</td><td> ${atiedot.postinumero }</td></tr>
- <tr><td>Postitoimipaikka:</td><td> ${atiedot.postitoimipaikka }</td></tr>
- </table>
- </c:if>
- <form action="TiedotServlet" method="get">
- Valinta:<br>
- <select name="valinta">
- <option></option> <!-- ensimmäisenä tyhjä vaihtoehto -->
- <c:forEach var="b" items="${tiedot}">
- <option>${b.postinumero }</option>
- </c:forEach>
- </select>
- <input type="submit" value="Submit">
- </form>
- <c:if test="${not empty Postinumerot}">
- <h2>Detailed information</h2>
- <p>
- <table>
- <c:forEach var="btiedot" items="${Postinumerot}">
- <tr><td>Nimi:</td><td> ${btiedot.nimi }</td></tr>
- <tr><td>Lahiosoite:</td><td> ${btiedot.osoite }</td></tr>
- <tr><td>Postinumero:</td><td> ${btiedot.postinumero }</td></tr>
- <tr><td>Postitoimipaikka:</td><td> ${btiedot.postitoimipaikka }</td></tr>
- </c:forEach>
- </table>
- </c:if>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement