Utility Tag Library: Overview
The Utility Tag Library consists of the following tags:
Context
This tag is used to reference certain state pertinent to the utility tag
service.
Navigation
These tags are used to construct dynamically generated link-type tags.
- link - Construct a link tag.
- attr - Add attributes to a link tag.
- url - Construct a context sensitive URL value.
- parm - Add req parms to an URL.
- forward
- Perform context sensitive JSP forwarding.
- include
- Perform context sensitive JSP include.
Beans & Collections
These tags operate on beans; usually with properties.
- beans - make a bean collection available to
the page.
- bean - make a bean object available to the page.
- get - get a bean property and write it to the
page.
- set - set a bean property to a value.
- copy - copy a bean property from another bean.
- if - test a bean property; include tag body if
true.
- ifnot - test a bean property; include tag body
if false.
- list - list all properties of a bean; useful
for debugging.
Session
This tag provides access to session attributes .
- session - access session attributes.
Message Catalog
These tags provide access to message catalogs of localized text.
- catalog - make a message catalog available
to the page.
- msg - get a message from a catalog and write
it to the page.
Miscellaneous
- edit - perform limited editing upon the tag body.
- content - set the content type and charset of the JSP response.
Tag Attribute Evaluation
Most attributes of most tags of the MA taglib set are subject to the following
rules of evaluation prior to tag processing:
- $(parameterName): All instances of expressions of this form are
replaced by the value of the http request parameter identified by parameterName.
- ${beanName:propertyName}: All instances of expressions of this
form are replaced by the value of the bean property identified by beanName
and propertyName. The bean is assumed to exist on the current page
context.
- $[catalogName:key]: All instances of expressions of this form
are replaced by the value of the message catalog entry identified by catalogName
and key. catalogName refers to a catalog bean placed on the
page context by a preceeding catalog tag.
- $/componentName:attributeName[:defaultValue]/: All instances
of expressions of this form are replaced by the client (device) specific
value of the portal server profile attribute identified by componentName
and attributeName. If the attribute does not exist, a null string
is returned, unless defaultValue is specified as well.
Examples of Tag Attribute Evaluation
<%-- attribute evaluation example --%>
<mail:message id="newmsg">
<mail:set property="to" value="$(to)"/>
</mail:message>
The value attribute will evaluate to the value of the http request
parameter named "to".
<%-- another attribute evaluation example --%>
<mail:message name="newmsg">
<mail:set property="to" value="${newmsg:to} $(to)"/>
</mail:message>
The value attribute will evaluate to the value of the "to" property
of the "newmsg" bean, followed by a space, followed by the value of the http
request parameter named "to".
Resource Lookup For url, include, and forward Tags
When the "comp" and "file" attributes are used in conjunction with the url,
include, and forward tags, the resource that is the subject of the tag will
be determined using the following lookup rules:
- A series of values will be collected that will be used as qualifying
elements of a resource lookup process...
- <jsproot> will be set to the value of the "ps.jsp.doc.root" property
found in /etc/opt/SUNWps/MAPConfig.properties, e.g., "/jsp".
- <type>, if it can be determined, will be set to the current
desktop type, e.g. "MAP".
- <locale>, if it can be determined, will be set to the user's
current locale, e.g. "en".
- <variant>, if it can be determined, will be set to the current
locale variant, e.g., "us".
- <component> will be set to the value of the "comp" attribute,
e.g., "mail", "cal", or "ab".
- <subcomponent> will be set to reflect the current type of backend
service is associated with <component>, e.g., "exchange", "notes",
or "sun-one".
- <clientpath> will be set to a relative file path based upon the
client type from which the request to the JSP is being made. This file
path is intended to reference a hierarchy of directories, the descent into
which represents increasingly specific associations between the JSPs stored
at any given level, and the device making the request, e.g., "wml/UP", or
"wml/Nokia", etc..
- Broadly, a search will be made for the file/resource specified by
the "file" attribute in the following order:
<jsproot>/<type>_<locale>/<component>/<subcomponent>/<clientpath>
<jsproot>/<type>_<locale>/<component>/<subcomponent>
<jsproot>/<type>_<locale>/<component>
<jsproot>/<type>_<locale>/<subcomponent>/<clientpath>
<jsproot>/<type>_<locale>/<subcomponent>
<jsproot>/<type>_<locale>
<jsproot>/<type>/<component>/<subcomponent>/<clientpath>
<jsproot>/<type>/<component>/<subcomponent>
<jsproot>/<type>/<component>
<jsproot>/<type>/<subcomponent>/<clientpath>
<jsproot>/<type>/<subcomponent>
<jsproot>/<type>
<jsproot>/default_<locale>/<component>/<subcomponent>/<clientpath>
<jsproot>/default_<locale>/<component>/<subcomponent>
<jsproot>/default_<locale>/<component>
<jsproot>/default_<locale>/<subcomponent>/<clientpath>
<jsproot>/default_<locale>/<subcomponent>
<jsproot>/default_<locale>
<jsproot>/default/<component>/<subcomponent>/<clientpath>
<jsproot>/default/<component>/<subcomponent>
<jsproot>/default/<component>
<jsproot>/default/<subcomponent>/<clientpath>
<jsproot>/default/<subcomponent>
<jsproot>/default
<jsproot>/<type>_<locale>/<component>/<clientpath>
<jsproot>/<type>_<locale>/<component>
<jsproot>/<type>_<locale>/<clientpath>
<jsproot>/<type>/<component>/<clientpath>
<jsproot>/<type>/<clientpath>
<jsproot>/default_<locale>/<component>/<clientpath>
<jsproot>/default_<locale>/<component>
<jsproot>/default_<locale>/<clientpath>
<jsproot>/default/<component>/<clientpath>
<jsproot>/default/<clientpath>
For each of the above listed directory path templates, and in turn, for each
of the directories in the relative path <clientpath> (processed lowest
directory to highest directory), the file/resource specified by "file" will
be tested for existence. The search terminates upon first match or
upon list exhaustion. The search only occurs within the confines of
the web application within which the JSPs have been deployed and to which
the request has been directed.