Tail taglib ver. 1.4

    Custom JSP taglib. Lets you simulate tail command in your OS. Body tag tail reads the last N rows from the given file and executes own body for the each row. One of parameters (id) describes a nested page scope variable (type is java.lang.String) you can use for access to the current row.

For example:
 


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

<!-- read last 50 rows and print them -->
<t:tail file="c:/webserver/log.txt" count="50" id="S">
  <br><%=S%>
</t:tail>

Tags are:

tail

Body tag executes own body for the each row at the end of the given file. Attributes are:

1) file describes a source file
2) id Optional attribute. Describes a name for page scope variable. Default value is line.
3) count Optional attribute. Describes a counter for rows. Default value is 20.

for downloading:

Library: tailtag.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Also in Coldtags: