Search taglib ver. 1.3

    Custom JSP taglib lets you write your own reports for Search servlet. In your configuration file for Search servlet you can set own JSP page for performing output (it is a parameter forward). And your JSP file will use this taglib for access to results of your search and visualizing the report. For example:

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

Found items: <s:getCounter/>

Results are:

  <br>URL is <%=url%>
  <br>Title is <%=title%>
  <br>Modified: <%=lastModified%>
  <br>Size is <%=size%> Kb

Body tag forEachItem lets you scan entities provided by Search servlet. In tag's body you can use the following variables described the current item: url - describes an URL for item (type is java.lang.String), title - describes a title for the current item (type is java.lang.String), lastModified - describes a last modification date (type is java.util.Date), size - describes a size in Kb for the current item (type is java.lang.Long).

Tags are:


Tag lets you obtain a counter for items in your search report. Parameters are:

1) id Optional parameter. Describes a name for the page scope variable (type is java.lang.Long) that will be used for saving your data. Without this parameter tag just prints data.


Body tag lets you implement a loop over existing items. Tag executes own body for the each item being found by Search servlet. Parameters are:

1) from Optional parameter. Describes a number for the first record (starting with 1). Default value is 1.
2) to Optional parameter. Describes a number for the last record. By default tag will loop up to the last available record.

for downloading:

Library: searchPackage.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Also in Coldtags: