Referer parameters taglib ver. 1.2

    Custom JSP taglib. This taglib lets you operate with parameters provided in referrer field. Referrer header contains an URL for site your clients come from. With this taglib you can loop over parameters in that URL as well as request parameters values. For example this taglib lets you obtain the search words when a client comes to your site from a search engine query.

For example:

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


<!-- search words from Google -->
<r:getRefParameter name="q"/>

Here tag forEachRefParameter lets you iterate over parameters in referrer's URL. Nested variables parameterName and parameterValue describe current values.

Tags are:


Body tag executes own body for the each referrer's URL parameter. Parameters are: none


Tag prints (saves in the page scope variable) one parameters from referrer's URL. Parameters are:

1) name describes a name for the parameter.
2) id Optional parameter. Describes a name for the page scope variable. (type is java.lang.String). Without this parameter tag just prints data.

for downloading:

Library: refparamtag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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