본문 바로가기

Framework/__Spring

JSTL Selectbox Default Selected

Map 이용.
   <select id="districtMap" name="districtMap">
    <c:forEach var="districtMap" items="${districtMap}">
     <option value="${districtMap.key}" <c:if test="${districtMap.key == districtMapCode}">selected</c:if>>
     ${districtMap.value}</option>
    </c:forEach>
   </select>

\참조

http://tong.nate.com/kangdydtjs/44598428
http://www.javajigi.net/servlet/JMBoard?tablename=tip&mode=view&boardpage=4&searchword=&searchscope=&category=&no=63