src.txt 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* ====================================================================
  2. * The Tmax soft License, Version 1.1
  3. *
  4. * Copyright (c) 1997-2004 The Tmax software.
  5. * All rights reserved.
  6. * html code omitted for readability.
  7. /* ====================================================================
  8. /* iterators.jsp */
  9. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  10. <%@ include file="../../upper.jsp" %>
  11. <br>
  12. <h2>&lt;forEach&gt; Test</h2>
  13. <br>
  14. <form action="iterators.jsp" method="GET">
  15. input number you want to iterate( 0 < x <= 100 )<br>
  16. <input type="text" size="3" name="iterate" value="${param["iterate"]}">
  17. <input type="submit" value="submit">
  18. </form>
  19. <c:catch>
  20. <c:choose>
  21. <c:when test="${param.iterate > 0 && param.iterate <= 100}">
  22. <c:forEach var="i" begin="1" end="${param.iterate}">
  23. ${i} <br>
  24. </c:forEach>
  25. </c:when>
  26. <c:when test="${empty param.iterate}"></c:when>
  27. <c:otherwise> you have to input number 1 to 100 </c:otherwise>
  28. </c:choose>
  29. </c:catch>
  30. <%@ include file="../../footer.html" %>