Defines a link to a target destination.

<dsp:a link-destination link-text
   [param-list]   [property-settings]
   [anchorid="id"]
   [requiresSessionConfirmation="{true|false}" ]
</dsp:a>

Attributes

link-destination

Specifies the link destination with one of the following attributes:

Attribute

Description

href

Set to path and file name. Resolves relative paths using the current page as a starting point. Resolves absolute paths using the Web server doc root as a starting point.

page

Set to path and file name. Resolves relative paths using the current page as a starting point. Resolves absolute paths using the Web application root as a starting point by prepending the request object’s contextroot to the specified value.

param-list

One or more embedded dsp:param tags that specify the parameters to pass to the link destination. For example:

<dsp:a href="homepage.jsp">Go to your home page
     <dsp:param name="city" beanvalue="Profile.homeAddress.city"/>
</dsp:a>
property-settings

Specifies settings for one or more bean properties. To set a single property, use the following syntax:

bean="property-specsource-spec

In order to set multiple properties within the same dsp:a tag, embed multiple dsp:property tags as follows:

<dsp:property bean="property-specsource-spec />
<dsp:property bean="property-specsource-spec />
...

In both cases, set property-specand source-specas follows:

Note: The same dsp:a tag cannot use both methods to set properties.

anchorid

Assigns a page-unique identifier to the anchor. Property-setting anchors require unique IDs when a page specifies multiple anchors and does not consistently display all of them. By providing an anchor ID, you can reliably reference this anchor.

requiresSessionConfirmation

Set to true in order to prevent cross-site attacks. If set to true, activation of this dsp:a tag supplies the request parameter _dynSessConf, which contains a randomly generated session long number that is associated with the current session. On receiving this request, the request-handling pipeline validates _dynSessConf against the current session’s confirmation number. If it detects a mismatch or missing number, it blocks further request processing.

Usage Notes

Like an HTML anchor tag, dsp:a defines a link with a target destination. dsp:a can also update a servlet bean property value and pass a page parameter to the destination page.

Note:dsp:a uses the iclass attribute in place of the cascading stylesheet class attribute to avoid using a Java reserved word in Java code.

Example

<dsp:a href="index.jsp" bean="/samples/Student_01.name"
paramvalue="userName">Click here to set the name</dsp:a>

In this example, the text Click here to set the name is a link. When clicked, the ATG platform sets the name property of the Student_01 component to the value held by the userName page parameter and opens index.jsp.

 
loading table of contents...