Custom JSP taglib lets you rotate ads on a website, even when the page is not reloaded. If your visitor will spend more time on a page, it makes sense to opt-in for displaying more than one ad at one page load.
Ad (or banner) here is a piece of HTML, rather than just image. Using HTML chunks, the ad
a formatted text, image etc.
Here tag displays an initial ad chunk, waits 120 seconds and requests a next chunk. Your server-side can return a next ad chunk (just a text) or XML code with ad chunk and timeout for the next request.
More precisely: your server side can return either XML or plain text. In case of XML output taglib assumes that XML tag content contains
a next ad block and XML tag timeout contains a new timeout (in seconds). For example:
In case of plain text it will be displayed as a new ad and default timeout will be used for the next request.
Negative value for the timeout means a permanent output (no next request will be raised).
You can assign some id to your ad block and request next ad block in JavaScript. Function name is
getNextAdChunk_yourId() (yourId here is id for your block). For example:
Tags are:
AjaxBanner
Body tag lets you rotate ads without page reloading. Parameters are:
1) id Optional parameter. Describes a CSS/DHTML id for your ad block.
2) url Optional parameter. Describes an url for the 'next ad' request.
3) urlFunction Optional parameter. Describes a function that will return an url.
4) timeout Optional parameter. Describes a default timeout for the next request.
for downloading:
Library: ajaxbannertag.jar Description: taglib.tld JavaScript library: cjajax.js
See also Coldtags suite - the largest collection of custom JSP tags.