转自:沉默王二
http://blog.csdn.net/qing_gee/article/details/76681747
<option value="${item.id}" <c:if test="${item.id==deal.market_id}">selected="selected"</c:if>>${item.marketname}</option>
这段代码,通过el表达式设置option的selected的写法过时或者不够优化。(jsp校检会报错)
应该这样:
<option value="${item.id}" ${item.id==deal.market_id?'selected':''}>${item.marketname}</option>