Last modified taglib ver. 1.7

    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" %>
<p><i> Last modified:</i> <last:lastModified/>

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" %>
<lm:lastModified id="var_name">/home/next.jsp</lm:lastModified>
<br>Date is  <%=var_name%>
    java.util.Date dt=var_name;

Tags are:


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
2) id Optional parameter. Describes a page scope variable for date. Without this parameter tag just prints date value.

for downloading:

 Library: lastmod.jar     Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: