Custom JSP taglib. Tag imagesGrid lets you publish pictures. Tag outputs all the graphical files from the given directory. For the each image tag shows a thumbnail with a link to servlet displays the full image. It is a quick way to create images gallery in your web applications. For example:
<%@ taglib uri="taglib.tld" prefix="im" %> <im:imagesGrid dir="c:/data/images/"/> Directory with pictures could be anywhere on your server, even the outside of your web application. By default tag uses a special servlet for getting images. If data directory is located under your web application tree than you can use HTML img tag for getting images. In order to use this taglib with build-in servlet you have to describe it also in your web.xml file:
<servlet> <servlet-name>showImage</servlet-name> <servlet-class>com.cj.album.showImage</servlet-class> </servlet> <servlet-mapping> <servlet-name>showImage</servlet-name> <url-pattern>/servlet/showImage</url-pattern> </servlet-mapping> Tags are: imagesGrid Outputs a table (grid) of graphical files (.gif, .jpg, jpeg, .png, .bmp) from the given directory. Parameters are: 1) dir Optional parameter. Describes a path to source directory. By
default it will be a current directory.
Note: the evaluation version displays up to 10 files. for downloading: Library: albumtag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|