Jstl of the use of foreach tags online a large number of, not to mention here, this time the main mark is why according to the normal notation does not show the value, ${value} put that what kind of show what kind of
The title effect is described as follows:
In the JSP:
<c:foreach begin= "1" var= "a" end= "5" step= "1" >
${a} <br>
</c:forEach>
Display effect:
${a}
${a}
${a}
${a}
${a}
Jstl References:
<%@ taglib uri= "Http://java.sun.com/jsp/jstl/core" prefix= "C"%>
Maven Engineering Pom File Reference package:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
Zocha Right one afternoon the final conclusion is that the Web. xml file was originally automatically generated and does not match the JSTL version
Bad use of Web. XML (head part):
<! DOCTYPE Web-app Public
"-//sun Microsystems, INC.//DTD Web application 2.3//en"
"Http://java.sun.com/dtd/web-app_2_3.dtd" >
Modified to:
<?xml version= "1.0" encoding= "UTF-8"?>
<web-app version= "2.5"
Xmlns= "Http://java.sun.com/xml/ns/javaee"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
Xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee
Http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd ">
~~~~~~~~~~~~~~
<web-app>
(PS: The first time this thing, don't maitai me)
The foreach label of the
Jstl expression only performs a loop that does not show the value taken out