Custom JSP tags library. Custom tag lastModified calculates 'last modified' time for your JSP pages. Tag's body describes your JSP page. By default (empty body) tag calculates 'last modified' date for the current page. You may use this tag in two forms: 1) just prints the date of the last modification for loaded document
<%@ taglib uri="taglib.tld" prefix="last" %> <html> <p><i> Last modified:</i> <last:lastModified/> </html> you may set your own format for printed value:
<last:lastModified format="dd/MM/yyyy hh:mm"/> 2) prints nothing, but creates a page scope variable (type is java.util.Date) initialized
by the 'last modified' time value. You may use this variable later in your
scriptlets:
<%@ taglib uri="taglib.tld" prefix="lm" %> <html> <lm:lastModified id="var_name">/home/next.jsp</lm:lastModified> <br>Date is <%=var_name%> <% java.util.Date dt=var_name; .... %> </html> Tags are: lastModified Body tag prints 'last modified' date for URL provided in tag's body. By default (empty body) tag prints 'last modified' date for the current page. Parameters are: 1) format Optional parameter. Describes a format for the calculated date
for downloading: Library: lastmod.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|