The anchor tag dsp:a lets you set a property on activation of the hyperlink:
<dsp:a href="url
" bean="property-spec
"source-spec
>link-text
</dsp:a>
where source-spec
specifies the source value in one of the following ways:
beanvalue=
property
-
spec
paramvalue=
param-name
value=
value
For example:
<dsp:a href="page2.jsp" bean="/samples/Student_01.name" value="Ron"> If your name is Ron, click here! </dsp:a>
When this link is clicked, the property Student_01.name
is set to Ron
before the browser opens the link.
Setting multiple properties
In order to set multiple properties within a dsp:a tag, use the following syntax:
<dsp:a href="url" <dsp:property bean=property-spec
"source-spec
/> <dsp:property bean=
property-spec
"source-spec
/>[...]
li
nk-text
</dsp:a>
Note: A dsp:a tag can set a property only if the destination URL specifies a JSP in the same Web application.