开发者

Query in data population using select in jsp

开发者 https://www.devze.com 2022-12-26 08:45 出处:网络
I am populat开发者_JAVA百科ing data using <select name=\"test\"> <option value=\'<%=session.getAttribute(\"tList\")%>\'><%=session.getAttribute(\"tList\") %></option>

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

精彩评论

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