开发者

How to Access an ArrayList in a JSP?

开发者 https://www.devze.com 2023-01-09 04:58 出处:网络
I have an ArrayList which contains cutomer name details. In my JSP I am using session scope like below:

I have an ArrayList which contains cutomer name details. In my JSP I am using session scope like below:

  <c:set var="CustomerData" 
        value="${ItemDataResponse.dataItemsList[1]}" sco开发者_运维技巧pe="session"/>
  • How can I display all the customer names in a drop down menu in my JSP?
  • How do I access an ArrayList in my JSP? (tags like JSTL, html I want to use to diplay the data)

Thanks for your help in advance.


Tune something like this:

<select name="xxx">
    <c:forEach items="${CustomerData}" var="customer">
    <option>${customer}</option>
    </c:forEach>
</select>
0

精彩评论

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