<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- 引入css -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible"content="IE=EmulateIE9"/>
<%@ taglib prefix="easy" tagdir="/WEB-INF/tags" %>
<title>标签文件简介示例</title>
<link >
</head>
<body>
Today is <easy:tagDemo/>
</body>
</html>
tag文件代码:
<%@ tag import="java.util.Date" import="java.text.DateFormat"%>
<%
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
Date now = new Date(System.currentTimeMillis());
out.println(dateFormat.format(now));
%>