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 & 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" %> <html> ... <go:link href="http://www.server.com/nextpage.htm"/> <go:link href="http://www.server.com/prevpage.htm">Link</go:link> ... </html> 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" %> <html> ... <go:link href="http://www.server.com/nextpage.htm"> <go:setText>Next page</go:setText> <go:setParameter name="A">value for A</go:setParameter> <go:setParameter name="B">value for B</go:setParameter> </go:link> ... </html> Tags are: link 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).
setText Body tag defines a text for hyperlink. Parameters are: none setParameter 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 See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|