[66] | 1 | <html><body><pre> |
---|
| 2 | <!-- |
---|
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 4 | contributor license agreements. See the NOTICE file distributed with |
---|
| 5 | this work for additional information regarding copyright ownership. |
---|
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 7 | (the "License"); you may not use this file except in compliance with |
---|
| 8 | the License. You may obtain a copy of the License at |
---|
| 9 | |
---|
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 11 | |
---|
| 12 | Unless required by applicable law or agreed to in writing, software |
---|
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 15 | See the License for the specific language governing permissions and |
---|
| 16 | limitations under the License. |
---|
| 17 | --> |
---|
| 18 | <html> |
---|
| 19 | <head> |
---|
| 20 | <title>Tag Plugin Examples: forEach</title> |
---|
| 21 | </head> |
---|
| 22 | <body> |
---|
| 23 | <h1>Tag Plugin Examples - &lt;c:forEach></h1> |
---|
| 24 | |
---|
| 25 | <hr> |
---|
| 26 | </br> |
---|
| 27 | <a href="notes.html">Plugin Introductory Notes<font <font color="#0000FF"></ |
---|
| 28 | a> |
---|
| 29 | <br/> |
---|
| 30 | <a href="howto.html">Brief Instructions for Writing Plugins<font color="#0000 |
---|
| 31 | FF"></a> |
---|
| 32 | <br/> <br/> |
---|
| 33 | <hr> |
---|
| 34 | |
---|
| 35 | <font color="#000000"/> |
---|
| 36 | </br> |
---|
| 37 | |
---|
| 38 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
---|
| 39 | <%@ page import="java.util.Vector" %> |
---|
| 40 | |
---|
| 41 | <h3>Iterating over a range</h3> |
---|
| 42 | <c:forEach var="item" begin="1" end="10"> |
---|
| 43 | ${item} |
---|
| 44 | </c:forEach> |
---|
| 45 | |
---|
| 46 | <% Vector v = new Vector(); |
---|
| 47 | v.add("One"); v.add("Two"); v.add("Three"); v.add("Four"); |
---|
| 48 | |
---|
| 49 | pageContext.setAttribute("vector", v); |
---|
| 50 | %> |
---|
| 51 | |
---|
| 52 | <h3>Iterating over a Vector</h3> |
---|
| 53 | |
---|
| 54 | <c:forEach items="${vector}" var="item" > |
---|
| 55 | ${item} |
---|
| 56 | </c:forEach> |
---|
| 57 | </body> |
---|
| 58 | </html> |
---|
| 59 | </pre></body></html> |
---|