Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Form submit with JSTL doesn't

843836Dec 10 2004 — edited Dec 11 2004
I 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%">&nbsp;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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2005
Added on Dec 10 2004
1 comment
513 views