<%@ page language="java" pageEncoding="gbk"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="date" class="java.util.Date"></jsp:useBean>
<html>
    <head>
        <title>I18N标签库</title>
    </head>
    <body>
        <H4>
            <c:out value="<fmt:setlocale>标签的使用"></c:out>
        </H4>
        <hr>
        <fmt:setLocale value="en_us" />
        英文:
        <fmt:formatDate value="${date}" type="both" dateStyle="full"
            timeStyle="full" />
        <hr>
        <fmt:setLocale value="zh_cn" />
        中文:
        <fmt:formatDate value="${date}" type="both" dateStyle="full"
            timeStyle="full" />
        <hr>
        <fmt:setLocale value="zh_TW" />
        中国台湾:
        <fmt:formatDate value="${date}" type="both" dateStyle="full"
            timeStyle="full" />
    </body>
</html>
<%@ page language="java" pageEncoding="gbk"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="date" class="java.util.Date"></jsp:useBean>
<html>
    <head>
        <title>I18N标签库</title>
    </head>
    <body>
        <fmt:formatDate value="${date}"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both" dateStyle="default"
            timeStyle="default"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both" dateStyle="short"
            timeStyle="short"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both" dateStyle="long"
            timeStyle="long"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both" dateStyle="full"
            timeStyle="full"></fmt:formatDate>
        <br>
        <fmt:formatDate value="${date}" type="both" dateStyle="full"
            timeStyle="full"></fmt:formatDate>
        <br>
    </body>
</html>