jsp - c:out 标签不打印值
问题描述
我正在关注这个jstl 教程。
我正在尝试c:forEach
循环打印值,但未打印值i
。
我的代码:
<%--
Created by IntelliJ IDEA.
User: Jaideep Shekhar
Date: 25.11.2020
Time: 15:00
To change this template use File | Settings | File Templates
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
<c:forEach var="i" begin="0" end="10">
<h1><c:out value="${i}"/></h1>
</c:forEach>
</body>
</html>
输出是:
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
${i}
任何帮助表示赞赏!
解决方案
推荐阅读
- python - 有什么技巧可以将这句话切成我想要的格式?
- share-open-graph - 通过FB分享opengraph功能分享多张图片/照片
- swift - 如何为渲染到纹理 iOS 应用启用 MSAA
- python - 我正在尝试打开一堆存储在列表中的网站,每次打开都会延迟 1 秒
- xamarin - 在 Prism 的页面序列中传递导航参数
- c# - 我的音频剪辑在播放统一 c# 后立即停止
- amazon-web-services - lambda 迭代查询 dynamodb
- java - 单击列表视图中的项目时,Android 应用程序崩溃
- concurrency - 并发执行的 CloudWatch 指标不起作用
- java - 应用程序仅在 PackageManager 中带有 NameNotFoundException 的华为手机上崩溃?