Sun Java System Portal Server Mobile Access 7.1 Tag Library Reference

url

Description

The purpose of this tag is to aid in the construction of URLs. The path portion of the URL may be specified in one of two ways: The path attribute may specify a path to be used verbatim during the construction of the URL. Client data specific rewriting will not be applied to this value. The file and comp attributes may together specify a JSP resource that will be resolved using context sensitive resource lookup rules. The servlet context path will be prepended to the resulting URL. Additionally, query string parameters may be appended to the URL by the inclusion of the appropriate parm tags within the body of the "url" tag. With the exception of the parm tags, all body content is discarded.

Tag Body

JSP

Tag Parent

<utilsPrefix:attr>

Restrictions

Either path or, file and comp must be specified.

Attributes

This tag has the following attributes for which the Required value is “No”:

file

The file for which to generate a URL reference. If file is specified, comp should be specified and path should not be specified.

comp

The component that the target file belongs to, e.g., "mail", "cal", or "ab".

path

The path component of the URL. If path is specified, neither file nor comp should be specified.

includeSid

A boolean that indicates whether or not the session id should ever be included in the generated URI.

Properties

n/a

Example(s)
<%-- example of url tag usage, with "path" attribute --%>

<util:link tagstart="<a" tagend=">">
	<util:attr attr="href">
		<util:url path="/portal/jsp/default/launchMail.jsp"></util:url>
	</util:attr>
	<util:attr attr="method">GET</util:attr>
</util:link>GO HOME</a>

Will generate a link that includes session encoding, if needed. The "path" attribute is not subject to the rules of resource lookup. The emitted markup may look something like:<a href="/portal/jsp/launchMail.jsp?sid=1a34" method="GET"/>. Another example...

<%-- example of url tag usage, with "file" and "comp" attributes --%>

<util:link tagstart="<a" tagend=">">
	<util:attr attr="href">
		<util:url file="inbox.jsp" comp="mail"></util:url>
	</util:attr>
	<util:attr attr="method">GET</util:attr>
</util:link>GO HOME</a>

Will generate a link that has been resolved to the correct path for the client that has requested the page. The session encoding is added as needed. The emitted markup may look something like: <a href="/portal/jsp/default/mail/wml/inbox.jsp?sid=1a34" method="GET"/>