Use JSTL <c:forEach> for this. JSTL support depends on the appropriate servlet container. For example, Tomcat does not come with JSTL out of the box. You can install JSTL by simply dropping jstl-1.2.jar in /WEB-INF/libyour web application. You can use the main JSTL tags in your JSP by declaring it according to its documentation at the top of your JSP file:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
(Object[]) List items <c:forEach>. var, :
<c:forEach items="${questions}" var="question">
<p>Question: ${question}</p>
</c:forEach>
, Java:
for (String question : questions) {
System.out.println("<p>Question: " + question + "</p>");
}