annotate WebContent/index.jsp @ 38:91ecbdda6f4a

Adding the remaining parameters to the form;
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 12 Dec 2013 16:39:26 +0000
parents 0c66cff0d1cc
children b31c64b316c5
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@38 9 <!-- no default value for distance -->
luis@32 10 <c:choose>
luis@32 11 <c:when test="${not empty param.dist}">
luis@32 12 <c:set var="dist" value="${param.dist}" />
luis@32 13 <c:set var="distSet" value="true" />
luis@32 14 </c:when>
luis@32 15 <c:otherwise>
luis@32 16 <c:set var="distSet" value="false" />
luis@32 17 </c:otherwise>
luis@32 18 </c:choose>
luis@32 19
luis@38 20 <!-- Default values for remaining parameters -->
luis@38 21 <c:set var="azim" value="0" />
luis@38 22 <c:set var="dirweight" value="0.2" />
luis@38 23 <c:set var="orient" value="horz" />
luis@38 24
luis@38 25 <c:if test="${not empty param.azim}">
luis@38 26 <c:set var="azim" value="${param.azim}" />
luis@38 27 </c:if>
luis@38 28 <c:if test="${not empty param.dirweight}">
luis@38 29 <c:set var="dirweight" value="${param.dirweight}" />
luis@38 30 </c:if>
luis@38 31 <c:if test="${not empty param.orient}">
luis@38 32 <c:set var="orient" value="${param.orient}" />
luis@38 33 </c:if>
luis@32 34
luis@0 35 </head>
luis@0 36
luis@0 37 <body>
luis@32 38 <form action="index.jsp" method="get">
luis@32 39 <div style="text-align: center">
luis@32 40 <table width="760" cellpadding="0" cellspacing="0">
luis@32 41 <tr>
luis@32 42 <td><img src="header_bg.jpg" alt="Header Image Not Found" width="779" height="72" /></td>
luis@32 43 </tr>
luis@32 44 </table>
luis@32 45 <br />
luis@27 46
luis@32 47 <h1>Human Echolocation WebApp Example Page</h1>
luis@0 48
luis@32 49 Input parameters:
luis@32 50 <br />
luis@32 51 Distance (typical value: 0.9):
luis@38 52 <input type="text" name="dist" size="8" value="${dist}">
luis@32 53 <br />
luis@32 54 Azimuth (-17 to +17):
luis@38 55 <input type="text" name="azim" size="8" value="${azim}" >
luis@32 56 <br />
luis@32 57 Orientation (angled / horiz):
luis@38 58 <input type="text" name="orient" size="8" value="${orient}">
luis@32 59 <br />
luis@32 60 Dirweight (angled / horiz):
luis@38 61 <input type="text" name="dirweight" size="8" value="${dirweight}">
luis@32 62 <br />
luis@32 63 <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 64
luis@32 65 <input type="submit" value="Generate">
luis@32 66 <br />
luis@26 67
luis@32 68 <br />
luis@32 69 </div>
luis@32 70 </form>
luis@27 71
luis@27 72
luis@32 73 <div id="player">
luis@32 74 <c:choose>
luis@32 75 <c:when test="${distSet==true}">
luis@32 76 <p class="debug">
luis@32 77 Generating echo with the following parameters:
luis@32 78 <br/>Distance <c:out value="${dist}"/>
luis@38 79 <br/>Azim <c:out value="${azim}"/>
luis@38 80 <br/>Dirweight <c:out value="${dirweight}"/>
luis@38 81 <br/>Orient <c:out value="${orient}"/>
luis@32 82 </p>
luis@38 83 <embed src="/echoapp/HumanEcho?dist=<c:out value="${dist}"/>&amp;azim=<c:out value="${azim}"/>&amp;dirweight=<c:out value="${dirweight}"/>&amp;orient=<c:out value="${orient}"/>" type="audio/x-wav"/>
luis@32 84 </c:when>
luis@32 85 <c:otherwise>
luis@32 86 <c:out value="Cowardly refusing to generate a player without distance parameter..."/>
luis@32 87 </c:otherwise>
luis@32 88 </c:choose>
luis@32 89 </div>
luis@32 90 <br />
luis@0 91 </body>
luis@0 92 </html>
luis@0 93