jstl 上拉列表

jstl 下拉列表edit select nameroleid c:forEach items${list} vartoption valuec:out v

jstl 下拉列表

edit

<select name="roleid" >

<c:forEach items="${list}" var="t">

<option value='<c:out value="${t.roleid}"/>' <c:if test="${user.roleid == t.roleid}">selected</c:if>>

<c:out value="${t.rolename}"/>

</option>

</c:forEach>

</select>