后台在数据库/接口中获取List<Hashtable<String,String>> serviceList
格式的数据传给前台。
List<Hashtable<String,String>> serviceList = JsonUtils.getServiceCenterList(callTalkJson);
前台JSP通过EL表达式 获取并展示
<select id="addr_code" name="addr_code" style="width:70%;height:18px;">
<option value="">请选择 </option>
<c:forEach items="${serviceList }" var="item" varStatus="status">
<option value="${item.keySet().iterator().next() }"<c:if test="${item.keySet().iterator().next()==addrCode }">selected</c:if> >${item.get(item.keySet().iterator().next()) }
</option>
</c:forEach>
</select>