Hi look at my sample code jsp.
<html:select property="dd" >
<c:forEach items="${students}" var="student">
<html
ption value="${student.RollNo}">${student.Name}</html
ption>
</c:forEach>
</html:select>
Only for the selected option value is not generating properly
see the generated servlet code:
<select name="dd" ">
<option value=" ">Name1</option>
<option value="11">Name2</option>
<option value="26">Name3</option>
<option value="51">Name4</option>
</select>
Why only for the first option it is saving as empty string
Other students (options) have proper student numbers.?.
Can anyone suggest some solution for this problem? Or Give any other way to do, I want to set roll nmbers as their option values.