jsp2.0为什么不行
一个简单的jsp2.0的测试,为什么出现下面的结果。大家都怎么用jsp2.0的
<%@page contentType="text/html;charset=gbk" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>Count to 10 Example (using JSTL and scriptlet)</title>
</head>
<body>
<%-- 这是利用JSTL 打印1到10 --%>
利用JSTL 打印1到10 <p>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i}" />
<br/>
</c:forEach>
<%-- 这是利用JSP的scriptlet 打印1到10 --%>
<p> 利用JSP的scriptlet 打印1到10 <p>
<% for(int i=1;i<=10;i++) {%>
<%=i%><br/>
<% } %>
</body>
</html>
利用JSTL 打印1到10
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
利用JSP的scriptlet 打印1到10
1
2
3
4
5
6
7
8
9
10