annotate WebContent/index.jsp @ 32:0c66cff0d1cc

The page is now generated using a simple form (using GET), and each time the page is generated a player is generated as well; small CSS changes.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 10 Dec 2013 17:39:27 +0000
parents 52adafab20c1
children 91ecbdda6f4a
rev   line source
luis@0 1 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
luis@32 2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
luis@0 3 <html>
luis@0 4 <head>
luis@13 5 <title>Human Echolocation</title>
luis@0 6 <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" />
luis@0 7 <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
luis@27 8
luis@32 9 <c:choose>
luis@32 10 <c:when test="${not empty param.dist}">
luis@32 11 <c:set var="dist" value="${param.dist}" />
luis@32 12 <c:set var="distSet" value="true" />
luis@32 13 </c:when>
luis@32 14 <c:otherwise>
luis@32 15 <c:set var="distSet" value="false" />
luis@32 16 </c:otherwise>
luis@32 17 </c:choose>
luis@32 18
luis@32 19 <c:set var="azim" value="${param.azim}" />
luis@32 20 <c:set var="dirweight" value="${param.dirweight}" />
luis@32 21 <c:set var="orient" value="${param.orient}" />
luis@32 22
luis@0 23 </head>
luis@0 24
luis@0 25 <body>
luis@32 26 <form action="index.jsp" method="get">
luis@32 27 <div style="text-align: center">
luis@32 28 <table width="760" cellpadding="0" cellspacing="0">
luis@32 29 <tr>
luis@32 30 <td><img src="header_bg.jpg" alt="Header Image Not Found" width="779" height="72" /></td>
luis@32 31 </tr>
luis@32 32 </table>
luis@32 33 <br />
luis@27 34
luis@32 35 <h1>Human Echolocation WebApp Example Page</h1>
luis@0 36
luis@32 37 Input parameters:
luis@32 38 <br />
luis@32 39 Distance (typical value: 0.9):
luis@32 40 <input type="text" name="dist" size="8">
luis@32 41 <br />
luis@32 42 Azimuth (-17 to +17):
luis@32 43 <input type="text" name="azim" size="8">
luis@32 44 <br />
luis@32 45 Orientation (angled / horiz):
luis@32 46 <input type="text" name="orient" size="8">
luis@32 47 <br />
luis@32 48 Dirweight (angled / horiz):
luis@32 49 <input type="text" name="dirweight" size="8">
luis@32 50 <br />
luis@32 51 <p class="description">Controls how easy it is to distinguish whether the reflector is to the left or the right (the lower .dirweight is, the easier).</p>
luis@0 52
luis@32 53 <input type="submit" value="Generate">
luis@32 54 <br />
luis@26 55
luis@32 56 <br />
luis@32 57 </div>
luis@32 58 </form>
luis@27 59
luis@27 60
luis@32 61 <div id="player">
luis@32 62 <c:choose>
luis@32 63 <c:when test="${distSet==true}">
luis@32 64 <p class="debug">
luis@32 65 Generating echo with the following parameters:
luis@32 66 <br/>Distance <c:out value="${dist}"/>
luis@32 67 <br/>Distset <c:out value="${distSet}"/>
luis@32 68 </p>
luis@32 69 <embed src="/echoapp/HumanEcho?dist=<c:out value="${dist}"/>" type="audio/x-wav"/>
luis@32 70 </c:when>
luis@32 71 <c:otherwise>
luis@32 72 <c:out value="Cowardly refusing to generate a player without distance parameter..."/>
luis@32 73 </c:otherwise>
luis@32 74 </c:choose>
luis@32 75 </div>
luis@32 76 <br />
luis@0 77 </body>
luis@0 78 </html>
luis@0 79