String Collection Examples : Collections « JSTL « Java






String Collection Examples

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
  <head>
    <title>String Collection Examples</title>
  </head>

  <body>
    <h3>String Collection Example</h3>

    <c:set var="str"
    value="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday" />

    <b>Input String:</b>

    <br />

    <br />

    <c:out value="${str}" />

    <br />

    <br />

    <b>Iterating:</b>

    <br />

    <br />

    <c:forEach var="day" items="${str}">
      <c:out value="${day}" />

      <br />
    </c:forEach>
  </body>
</html>



           
       








JSTL-Iteration-and-strings.zip( 852 k)

Related examples in the same category

1.JSTL Modify a collection
2.JSTL Iteration over tokens