两个小时没有解决的一个标签问题??

shuishi0 2009-03-03 04:48:11
<%@ page contentType="text/html;charset=GB2312" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="now" class="java.util.Date"/>
<fmt:setLocale value="zh-cn"/>
<html>
<head>
<title>JSTL 简单示例</title>
</head>
<body>
<h3>JSTL 简单示例</h3>
<%
now=new Date();
out.println(now);
Collection customers=new ArrayList();
customers.add(new String("customer1"));
customers.add(new String("customer2"));
customers.add(new String("customer3"));
request.setAttribute("customers",customers);
%>
<h4>输出请求对象中所有客户</h4>
<!-- 使用jstl标签完成页面输出任务 -->
<br>
当前时间是
<br>
<!--jstl 标签格式化输出时间 -->
<fmt:timeZone value="GMT">
<fmt:formatDate value="${now}" type="both" dateStyle="full" timeStyle="full"/>
</fmt:timeZone>

</body>
</html>



出现错误的是这两行
<c:set var="customers"scope="session" value="${requestScope.customers}"/>
<fmt:formatDate value="${now}" type="both" dateStyle="full" timeStyle="full"/>
...全文
63 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧