Custom JSP taglib. This taglib lets you change in dynamic
links for resources on your HTML pages. Suppose you have a site with heavy traffic.
In order to unload your server you may decide to serve some requests from other boxes in
your cluster. For example in your HTML page you can use this taglib for images:
<%@ taglib uri="taglib.tld" prefix="lb" %> <lb:img src="pic.gif" param="A" /> Here A describes a context parameter for your web application. Tag
assumes that this parameter describes a list of available servers (comma separated).
E.g. in your web.xml file you can have some like this:
<context-param> <param-name>A</param-name> <param-value>http://www1.host.com, http://www2.host.com</param-value> </context-param> and it this case tag img will use as a source http://www1.host.com/pic.gif or http://www2.host.com/pic.gif. If context parameter A does not exist than tag will use src parameter "as is". In other words this tag provides a load balance schema for your resources. This taglib supports load balanced equivalents for three HTML tags: img, href and form (you can rotate URL's for action parameter.) Tags are: img Provides a load balanced replacement for HTML img tag. Parameters are: 1) src Describes source for image
link Body tag. Provides a load balanced replacement for HTML <a href tag. Tag's body defines a link. Parameters are: 1) href Describes a href parameter
form Body tag. Provides a load balanced replacement for HTML form tag. Parameters are: 1) action Describes an action parameter
for downloading: Library: lbalance.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|