<ao:a>

Renders an <a> tag.

The body is trimmed while written. If the body is empty after being trimmed, then href itself will be written as the body. If the href begins with mailto:, the mailto: is stripped and the remainder of the href is displayed verbatim. If the href begins with telnet:, the telnet: is stripped and the remainder of the href is displayed verbatim. If the href begins with tel:, the tel: is stripped and the remainder of the href is displayed verbatim.

Any attribute that has no namespace and begins with param. is added to the href as a URL parameter. The parameter name is the part of the attribute name following param..

When a parameter value is null it is not added. If the value is an Iterable, Iterator, Enumeration, or array, then each non-null element is coerced to String as a separate parameter in iteration order. Otherwise, the value itself is coerced to String for the parameter value.

Nested <ao:param> or <ao:params> tags will add parameters after any provided as attributes.

Tag Information

Tag Class: com.aoindustries.taglib.ATag
TagExtraInfo Class: None
Body Content: scriptless
Display Name: None
Dynamic Attributes: true

Attributes

Name Required Evaluation Type Description
id No Runtime Object

The id of the element. A nested <ao:id> tag will override this value.

href No Runtime String

The href for the link. The href is modified in several ways to make things much easier to work with.

A nested <ao:href> tag will override this value.

In order to make relative paths predictable, relative paths are interpreted from the current JSP page, as long as all includes have been done via <ao:include> and any forward via <ao:forward>.

In order to keep paths app-relative, if starts with a /, the context path will be prepended to the path.

In order to simplify things behing URL mapping schemes, the href is always written starting with '/'. This avoids any need to include any <ao:base> tags.

URL rewriting is performed as needed via HttpServletResponse.encodeURL.

To support paths in different character sets, URL encoding is performed on every path element up to the last # or ? (first of the two), except for any character in the set {':', '/', ';', '#'}. To avoid ambiguity, any parameters or anchors in the URL must have been correctly encoded by the caller.

Any directly nested <ao:param> or <ao:params> tag will add parameters to the href.

hrefAbsolute No Static boolean

When true, generates an absolute URL for the href for the link. Defaults to false.

addLastModified No Static String

If the href represents a local resource, a parameter of "lastModified=#####" may be automatically added with the timestamp of the local resource to the nearest second. May be one of true, false, or auto. Defaults to auto.

In auto mode, last modified stamping may be disabled by the client with the X-com-aoindustries-servlet-http-LastModifiedServlet-lastModified: false header.

hreflang No Runtime Object

The hreflang for the link. A nested <ao:hreflang> tag will override this value.

rel No Runtime Object

The rel for the link. A nested <ao:rel> tag will override this value.

type No Runtime Object

The type for the link. A nested <ao:type> tag will override this value.

target No Static Object

The target for the link. A nested <ao:target> tag will override this value.

title No Runtime Object

The title text for the link. A nested <ao:title> tag will override this value.

class No Runtime Object

The CSS class for the link. A nested <ao:class> tag will override this value.

style No Runtime Object

The CSS style for the link. A nested <ao:style> tag will override this value.

onclick No Static Object

A JavaScript onclick handler. A nested <ao:onclick> tag will override this value.

onmouseover No Static Object

A JavaScript onmouseover handler. A nested <ao:onmouseover> tag will override this value.

onmouseout No Static Object

A JavaScript onmouseout handler. A nested <ao:onmouseout> tag will override this value.

Variables

No Variables Defined.