comparison 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
comparison
equal deleted inserted replaced
37:7d2163eeacc3 38:91ecbdda6f4a
4 <head> 4 <head>
5 <title>Human Echolocation</title> 5 <title>Human Echolocation</title>
6 <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" /> 6 <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" />
7 <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> 7 <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
8 8
9 <!-- no default value for distance -->
9 <c:choose> 10 <c:choose>
10 <c:when test="${not empty param.dist}"> 11 <c:when test="${not empty param.dist}">
11 <c:set var="dist" value="${param.dist}" /> 12 <c:set var="dist" value="${param.dist}" />
12 <c:set var="distSet" value="true" /> 13 <c:set var="distSet" value="true" />
13 </c:when> 14 </c:when>
14 <c:otherwise> 15 <c:otherwise>
15 <c:set var="distSet" value="false" /> 16 <c:set var="distSet" value="false" />
16 </c:otherwise> 17 </c:otherwise>
17 </c:choose> 18 </c:choose>
18 19
19 <c:set var="azim" value="${param.azim}" /> 20 <!-- Default values for remaining parameters -->
20 <c:set var="dirweight" value="${param.dirweight}" /> 21 <c:set var="azim" value="0" />
21 <c:set var="orient" value="${param.orient}" /> 22 <c:set var="dirweight" value="0.2" />
23 <c:set var="orient" value="horz" />
24
25 <c:if test="${not empty param.azim}">
26 <c:set var="azim" value="${param.azim}" />
27 </c:if>
28 <c:if test="${not empty param.dirweight}">
29 <c:set var="dirweight" value="${param.dirweight}" />
30 </c:if>
31 <c:if test="${not empty param.orient}">
32 <c:set var="orient" value="${param.orient}" />
33 </c:if>
22 34
23 </head> 35 </head>
24 36
25 <body> 37 <body>
26 <form action="index.jsp" method="get"> 38 <form action="index.jsp" method="get">
35 <h1>Human Echolocation WebApp Example Page</h1> 47 <h1>Human Echolocation WebApp Example Page</h1>
36 48
37 Input parameters: 49 Input parameters:
38 <br /> 50 <br />
39 Distance (typical value: 0.9): 51 Distance (typical value: 0.9):
40 <input type="text" name="dist" size="8"> 52 <input type="text" name="dist" size="8" value="${dist}">
41 <br /> 53 <br />
42 Azimuth (-17 to +17): 54 Azimuth (-17 to +17):
43 <input type="text" name="azim" size="8"> 55 <input type="text" name="azim" size="8" value="${azim}" >
44 <br /> 56 <br />
45 Orientation (angled / horiz): 57 Orientation (angled / horiz):
46 <input type="text" name="orient" size="8"> 58 <input type="text" name="orient" size="8" value="${orient}">
47 <br /> 59 <br />
48 Dirweight (angled / horiz): 60 Dirweight (angled / horiz):
49 <input type="text" name="dirweight" size="8"> 61 <input type="text" name="dirweight" size="8" value="${dirweight}">
50 <br /> 62 <br />
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> 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>
52 64
53 <input type="submit" value="Generate"> 65 <input type="submit" value="Generate">
54 <br /> 66 <br />
62 <c:choose> 74 <c:choose>
63 <c:when test="${distSet==true}"> 75 <c:when test="${distSet==true}">
64 <p class="debug"> 76 <p class="debug">
65 Generating echo with the following parameters: 77 Generating echo with the following parameters:
66 <br/>Distance <c:out value="${dist}"/> 78 <br/>Distance <c:out value="${dist}"/>
67 <br/>Distset <c:out value="${distSet}"/> 79 <br/>Azim <c:out value="${azim}"/>
80 <br/>Dirweight <c:out value="${dirweight}"/>
81 <br/>Orient <c:out value="${orient}"/>
68 </p> 82 </p>
69 <embed src="/echoapp/HumanEcho?dist=<c:out value="${dist}"/>" type="audio/x-wav"/> 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"/>
70 </c:when> 84 </c:when>
71 <c:otherwise> 85 <c:otherwise>
72 <c:out value="Cowardly refusing to generate a player without distance parameter..."/> 86 <c:out value="Cowardly refusing to generate a player without distance parameter..."/>
73 </c:otherwise> 87 </c:otherwise>
74 </c:choose> 88 </c:choose>