?? tstamp.jsp
字號:
<%@ page import="java.io.File" errorPage="err.jsp" %>
<%@ taglib uri="gnat" prefix="gnat" %>
<%--
Use the Servlet 2.2+ temporary working directory to demo some file stuff.
Makes it easier because the user doesn't have to configure anything and I
don't have to worry about file system and user permissions for the demo.
See section 3.7 of Servlet 2.3 spec for description of this attribute.
--%>
<%! File tempdir = null; %>
<% tempdir = (File)application.getAttribute("javax.servlet.context.tempdir"); %>
<html>
<head>
<title>Gnat JSP Taglib</title>
<link type="text/css" href="examples.css" rel="stylesheet">
</head>
<body>
<h1>Gnat Taglib: tstamp</h1>
<p>Sets the DSTAMP, TSTAMP and TODAY properties in the current page. The DSTAMP
is in the "yyyymmdd" format, the TSTAMP is in the "hhmm" format and TODAY is "month
day year".</p>
<p>example 1 - set tstamp</p>
<p class="tag"><gnat:tstamp/></p>
<gnat:tstamp/>
<h3>Getting tstamp values from their scripting variables</h3>
<p>DSTAMP = <%= DSTAMP %></p>
<p>TSTAMP = <%= TSTAMP %></p>
<p>TODAY = <%= TODAY %></p>
<h3>Getting tstamp values using JSP expressions</h3>
<p><%= pageContext.getAttribute("TODAY") %> = <%= pageContext.getAttribute("TODAY") %></p>
<p><%= pageContext.getAttribute("DSTAMP") %> = <%= pageContext.getAttribute("DSTAMP") %></p>
<p><%= pageContext.getAttribute("TSTAMP") %> = <%= pageContext.getAttribute("TSTAMP") %></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -