Is it possible to display the elements of a list in a list with a foreach in a jsp?
List<List<String>> elements;
i was thinking something like :
<c:forEach var="charge" items="${customerOfferForm.offersWithCharges.get(0)}">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your syntax will work in EL 2.2 (which is available since Servlet 3.0 containers such as Tomcat 7, Glassfish 3, etc), but not in older versions. You can then use the brace notation
[]to get the desired list item by index.You can if necessary use a nested
<c:forEach>to display all items.See also: