📄 tagfile.tag
字号:
<%@ tag pageEncoding="GB2312" %>
<%@ tag import="java.util.Date,java.text.DateFormat" %>
<%@ variable name-given="fullDate" %>
<%@ variable name-given="longDate" %>
<%@ variable name-given="mediumDate" %>
<%@ variable name-given="shortDate" %>
<%
Date now = new Date(System.currentTimeMillis());
DateFormat fullFormat = DateFormat.getDateInstance(DateFormat.FULL);
DateFormat longFormat = DateFormat.getDateInstance(DateFormat.LONG);
DateFormat mediumFormat = DateFormat.getDateInstance(DateFormat.MEDIUM);
DateFormat shortFormat = DateFormat.getDateInstance(DateFormat.SHORT);
jspContext.setAttribute("fullDate", fullFormat.format(now));
jspContext.setAttribute("longDate", longFormat.format(now));
jspContext.setAttribute("mediumDate", mediumFormat.format(now));
jspContext.setAttribute("shortDate", shortFormat.format(now));
%>
<jsp:doBody/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -