File monitor taglib ver. 1.4


    Custom JSP taglib. This taglib lets you monitor changes for some file and execute (do not execute) body depends on the detected changes. Tags saves last modified time in the application (session) scope during the first execution and can evaluate the given JSP code on the subsequent calls.

For example:

we have to do something only if file data.xml has been changed
 


<%@ taglib uri="taglib.tld" prefix="if" %>

<if:isChanged file="data.xml">
  ...
</if:isChanged>

You can use this taglib for cache support or for some web content management system for example.

Tags are:

isChanged

Body tag. Executes own body if date of last modification for the given file has been changed. Parameters are:

1) file target file
2) scope Optional parameter. Possible values are session or application. Defines scope for modifications tracking: globally (application scope) or per user (session scope). Default value is session.
3) first Optional parameter. Possible values are true or false. Evaluate (do not evaluate) body if file has been tracked for the first time. Default value is true (evaluate body).

notChanged

Body tag. Executes own body if date of last modification for the given file has not been changed. Parameters are:

1) file target file
2) scope Optional parameter. Possible values are session or application. Defines scope for modifications tracking: globally (application scope) or per user (session scope). Default value is session.
3) first Optional parameter. Possible values are true or false. Evaluate (do not evaluate) body if file has been tracked for the first time. Default value is true (evaluate body).

for downloading:

Library: fmonitor.jar    Description: taglib.tld

© Coldbeans      Comments?

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


     

Also in Coldtags suite: