Form submit with JSTL doesn't
843836Dec 10 2004 — edited Dec 11 2004I am modifying code that used just javascript and no JSTL to use JSTL for building a table of radio buttons. Unfortunately, when I click the button to submit the form, which worked fine with Javascript before I switched toa form with JSTL, no the attribute value for the radio button comes back in the servlet as null. WHat is missing here to get the actual value of the radio button submitted as a request attribute? Here's the code:
<%
HashMap seasons = (HashMap) request.getAttribute("seasons");
%>
<!--
PRIMARY NAVIGATION
-->
<hr/>
<div align="right">
<form method=POST action="<jsp:getProperty name="req" property="contextPath"/>/regcontrol?command=SeasonSelection">
<table cellspacing="0" class="display">
<tr bgcolor="#bbbbbb" align="center">
<th align="left" width="15%"> Season</th>
</tr>
<c:forEach var="season" items="${seasons}">
<tr align="left">
<td>
<input type="radio" name="seasonButton" value="<c:out value="${season.key}"/>" />
<c:out value="${season.value}"/>
</td>
</tr>
</c:forEach>
</table>
<input type="button" name="quit" class="controls" value="Quit" onclick="document.location.href='<jsp:getProperty name="req" property="contextPath"/>/regcontrol?command=SessionDone'"/>
<input type="submit" name="begin" class="controls" value="Continue"/>
</form>
</div>
Thanks.
Ken