Link taglib ver. 2.4

    Custom JSP tag. Renders a HTML (WML) hyperlink (<a> tag) to the specified URL. Tag supports sessions, so URL rewriting will be added automatically. You may use this tag as a standard replacement for HTML (WML) <a> tag in your JSP pages. For WAP/WML clients tag replaces also & with &amp;

Some unique parameter can be added also to your link (a standard trick for non-cached links).

For example:

<%@ taglib uri="taglib.tld" prefix="go" %>
<go:link href=""/>
<go:link href="">Link</go:link>

You can set a text for your hyperlink as a tag's body or through the parameter text or through the special tag setText. Tag setParameter lets you define a GET parameter for the link (value will be encoded automatically):

<%@ taglib uri="taglib.tld" prefix="go" %>
<go:link href="">
 <go:setText>Next page</go:setText>
 <go:setParameter name="A">value for A</go:setParameter>
 <go:setParameter name="B">value for B</go:setParameter>

Tags are:


Body tag renders HTML (WML) hyperlink. Parameters are:

1) href Optional parameter. Describes an URL. By default tag will use the current URL (request URI).
2) target Optional parameter. Describes a target frame.
3) title Optional parameter. Describes a title (tooltip).
4) className Optional parameter. Describes a CSS class.
5) style Optional parameter. Describes a CSS style.
6) rel Optional parameter. Describes a rel attribute.
7) unique Optional parameter. Possible values are true or false. If this value is true tag adds unique parameter to link that makes it non-cached. Default value is false (do not add).
8) text Optional parameter. Describes a text for hyperlink. By default tag will use the value of href parameter as a text.
9) onClick Optional parameter. Describes a JavaScript code for 'onclick' event.
10) prefix Optional parameter. Describes a part of URL that will be added to the local (not started with http://) links. By default is empty.
11) cond Optional parameter. Describes a boolean attribute tag's behavior depends on. Default value is true (create a link).


Body tag defines a text for hyperlink. Parameters are: none


Body tag defines a parameter for hyperlink. Parameters are:

1) name Describes a name for your parameter

for downloading:

Library: linktag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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

Also in Coldtags: