开发者

Query in data population using select in jsp

I am populat开发者_JAVA百科ing data using

<select name="test">
<option value='<%=session.getAttribute("tList")%>'><%=session.getAttribute("tList") %></option>

</select>

but the values are getting display in a single row in the combo box not row wise,where i am going wrong ?


I'd suggest adding a jstl loop:

<select name="test">
    <c:forEach items="${sessionScope.tList}" var="item">
        <option value="${item}">${item}</option>
    </c:forEach>
</select>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜