Mercurial > hg > human-echolocation-java-webapp
view 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 |
line wrap: on
line source
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <head> <title>Human Echolocation</title> <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" /> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> <!-- no default value for distance --> <c:choose> <c:when test="${not empty param.dist}"> <c:set var="dist" value="${param.dist}" /> <c:set var="distSet" value="true" /> </c:when> <c:otherwise> <c:set var="distSet" value="false" /> </c:otherwise> </c:choose> <!-- Default values for remaining parameters --> <c:set var="azim" value="0" /> <c:set var="dirweight" value="0.2" /> <c:set var="orient" value="horz" /> <c:if test="${not empty param.azim}"> <c:set var="azim" value="${param.azim}" /> </c:if> <c:if test="${not empty param.dirweight}"> <c:set var="dirweight" value="${param.dirweight}" /> </c:if> <c:if test="${not empty param.orient}"> <c:set var="orient" value="${param.orient}" /> </c:if> </head> <body> <form action="index.jsp" method="get"> <div style="text-align: center"> <table width="760" cellpadding="0" cellspacing="0"> <tr> <td><img src="header_bg.jpg" alt="Header Image Not Found" width="779" height="72" /></td> </tr> </table> <br /> <h1>Human Echolocation WebApp Example Page</h1> Input parameters: <br /> Distance (typical value: 0.9): <input type="text" name="dist" size="8" value="${dist}"> <br /> Azimuth (-17 to +17): <input type="text" name="azim" size="8" value="${azim}" > <br /> Orientation (angled / horiz): <input type="text" name="orient" size="8" value="${orient}"> <br /> Dirweight (angled / horiz): <input type="text" name="dirweight" size="8" value="${dirweight}"> <br /> <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> <input type="submit" value="Generate"> <br /> <br /> </div> </form> <div id="player"> <c:choose> <c:when test="${distSet==true}"> <p class="debug"> Generating echo with the following parameters: <br/>Distance <c:out value="${dist}"/> <br/>Azim <c:out value="${azim}"/> <br/>Dirweight <c:out value="${dirweight}"/> <br/>Orient <c:out value="${orient}"/> </p> <embed src="/echoapp/HumanEcho?dist=<c:out value="${dist}"/>&azim=<c:out value="${azim}"/>&dirweight=<c:out value="${dirweight}"/>&orient=<c:out value="${orient}"/>" type="audio/x-wav"/> </c:when> <c:otherwise> <c:out value="Cowardly refusing to generate a player without distance parameter..."/> </c:otherwise> </c:choose> </div> <br /> </body> </html>