关于无法解析日期的问题
<%@page contentType="text/html; utf-8" language="java" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>
<title></title>
<link rel="stylesheet" type="text/css" href="css/all.css"/>
<link rel="stylesheet" type="text/css" href="css/pop.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
</head>
<body style="background: #e1e9eb;">
<form action="" id="mainForm" method="post">
<div class="right">
<div class="current">
当前位置:<a href="#">导入/导出</a> > 导入结果
</div>
<div class="rightCont">
<p class="g_title fix">导入结果展示</p>
<table class="tab1">
<tbody>
<tr>
<td align="right" width="80">标题:</td>
<td>${requestScope.result.title}</td>
</tr>
</tbody>
</table>
<div class="zixun fix">
<table class="tab2" width="100%">
<tbody>
<tr>
<th>序号</th>
<th>姓名</th>
<th>年龄</th>
<th>出生日期</th>
</tr>
<c:forEach items="${requestScope.result.studentList}" var="item" varStatus="idx">
<tr>
<td>${idx.index}</td>
<td>${item.name}</td>
<td>${item.age}</td>
<td>${item.date}</td>
<%--<td><fmt:parseDate value="${item.date}" pattern="yyyy-MM-dd"></fmt:parseDate></td>--%>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</form>
</body>
</html>不用格式化日期没问题

当用格式化日期报错,提示不能解析

包也已经导入了

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
与老师的区别就是这两行的后面不是core_rt,fmt_rt。我这个没有core_rt,fmt_rt
0
收起
正在回答 回答被采纳积分+1
从网页搭建入门Java Web2018版
- 参与学习 人
- 提交作业 1088 份
- 解答问题 10204 个
如果你有Java语言基础,又想以后从事Java Web开发,那么本路径是你的不二选择!本路径从网页搭建开始入手,通过大量案例来学习Java Web基础。定能助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星