Custom JSP taglib. Tags let you to display different image or files from a group of files on every request to your page. So at the end of the day you will get a more dynamic look and feel to your website. For example: 1) Output the random image from the given directory:
<%@ taglib uri="taglib.tld" prefix="r" %> <r:randomImage dir="/images"/> 2) Rotate files:
<%@ taglib uri="taglib.tld" prefix="r" %> <r:rotateFile dir="/announces"/> All tags do nothing if the source directory does not exist or this directory is empty. Tags are: randomImage Tag mimics HTML img tag where the image will be randomly selected from the given directory. Parameters are: 1) dir Describes a directory with images (.gif, .jpg, .jpeg, .png .bmp files)
rotateImage Tag mimics HTML img tag where the image will be selected from the given directory in rotation. Parameters are: 1) dir Describes a directory with images (.gif, .jpg, .jpeg, .png .bmp files)
randomFile Tag mimics jsp:include tag where the page will be randomly selected from the given directory. Parameters are: 1) dir Describes a directory with jsp files
randomFiles Body tag lets you include several random files from the given directory. Tag's body is a separator. Parameters are: 1) dir Describes a directory with jsp files
rotateFile Tag mimics jsp:include tag where the included page will be selected from the given directory in rotation. Parameters are: 1) dir Describes a directory with jsp files
for downloading: Library: randomcontent.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|