Source Code : Count to 10 Example using JSTL

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Count to 10 Example using JSTL


<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
  <head>
    <title>Count to 10 Example(using JSTL)</title>
  </head>

  <body>
    <table border="1">
      <tr>
        <td valign="top">
          <h3>From 1 to 10</h3>

          <c:forEach var="i" begin="1" end="10">
            <c:out value="${i}" />

            <br />
          </c:forEach>
        </td>

        <td valign="top">
          <h3>From 10 to 1</h3>

          <c:forEach var="i" begin="1" end="10">
            <c:out value="${11-i}" />

            <br />
          </c:forEach>
        </td>
      </tr>

      <tr>
        <td>
          <h3>By Twos</h3>

          <c:forEach var="i" begin="2" end="10" step="2">
            <c:out value="${i}" />

            <br />
          </c:forEach>
        </td>

        <td valign="top">&nbsp;
        </td>
      </tr>
    </table>
  </body>
</html>


           
       

Thank with us