我的下拉列表在jsp页面中默认不选择值,并且不在控制台中打印值:
<select id="dropdown">
<c:forEach var="item" items="${requestForm.Approve}">
<c:set var = "itemId" value = '${item.id}: ${item.display}'/>
<option value="<c:out value='${item.id}: ${item.display}' />"
<c:if test="${itemId == requestForm.Approve}"> selected </c:if> >
<% out.println("value of item id is "+pageContext.findAttribute("itemId")); %></option></c:forEach>
</select>