jsp页面默认不选择下拉列表

时间:2015-11-30 17:19:10

标签: jsp

我的下拉列表在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>

0 个答案:

没有答案