The anchor tag dsp:a lets you set a property on activation of the hyperlink:

<dsp:a href="url" bean="property-specsource-speclink-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-specsource-spec />
   <dsp:property bean=property-specsource-spec />
   [...]
link-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.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices